[db_set] Now ignores REPO_VERSION value in db

This commit is contained in:
ayakael 2018-07-02 07:09:53 -08:00
parent 76aa6fc6d9
commit a184b1d70b
No known key found for this signature in database
GPG key ID: 575626A4AE5F4026

View file

@ -24,7 +24,7 @@ db_set() {
local CONDITION="${@}"
if [[ "${CONDITION}" == "all" ]]; then
gawk -i inplace -v selected=${SELECTED} 'BEGIN{FS="\t";OFS="\t";}{if($1!="LAST_DEPLOY" && $1!="LAST_UPDATE" && $1!="REPO_ID" && $1!="null"){$1=selected}{print $0}}' "${DB_FILE}"
gawk -i inplace -v selected=${SELECTED} 'BEGIN{FS="\t";OFS="\t";}{if($1!="LAST_DEPLOY" && $1!="LAST_UPDATE" && $1!="REPO_ID" && $1!="REPO_VERSION" && $1!="null"){$1=selected}{print $0}}' "${DB_FILE}"
cat "${DB_FILE}"
return 0
fi
@ -35,7 +35,7 @@ db_set() {
# Determines which IMAGEIDs present in the DB_FILE match the CONDITION
local COUNT=1
local dbimageidList=$(awk 'BEGIN{FS="\t"}{if($1!="LAST_DEPLOY" && $1!="LAST_UPDATE" && $1!="REPO_ID" && $1!="null"){print $2}}' ${DB_FILE} | awk '!seen[$0]++')
local dbimageidList=$(awk 'BEGIN{FS="\t"}{if($1!="LAST_DEPLOY" && $1!="LAST_UPDATE" && $1!="REPO_ID" && $1!="REPO_VERSION" && $1!="null"){print $2}}' ${DB_FILE} | awk '!seen[$0]++')
for dbimageid in ${dbimageidList[@]}; do
local MTAG="$(printf "${GIT_DIR}/%s.tags" ${dbimageid})"
local MATCH="$(grep -i -l "\"${FIELD}\" : \"${VALUE}\"" "${MTAG}")"