[cmd_deploy] RemovableIDs now includes all tracks that are tagged with "null"

This commit is contained in:
ayakael 2018-04-15 21:19:23 -04:00
parent 3b66148c9b
commit b77b5290a7
No known key found for this signature in database
GPG key ID: 575626A4AE5F4026

View file

@ -24,7 +24,7 @@ cmd_deploy() {
local NEW_COMMIT=$(git -C "${GIT_DIR}" rev-parse HEAD)
local OLD_COMMIT=$(awk 'BEGIN{FS="\t"}{if($1=="LAST_DEPLOY"){print $2}}' ${DB_FILE})
local removableidList=($(awk 'BEGIN{FS="\t"}{if(($1=="false" && $1=="null") && $4!="null"){print $2"--"$3}}' "${DB_FILE}"))
local removableidList=($(awk 'BEGIN{FS="\t"}{if($1=="null" && $4!="null"){print $2"--"$3}}' "${DB_FILE}"))
local deployableidList=($(awk 'BEGIN{FS="\t"}{if($1=="true" && $4=="null"){print $2}}' "${DB_FILE}" | awk '!seen[$0]++'))
local changedidList=($(sed 's/\(.*\)\..*/\1/' <<< $(git -C "${GIT_DIR}" diff --name-only ${NEW_COMMIT} ${OLD_COMMIT}) | awk '!seen[$0]++' | grep SHA256))
local updateableidList=($(printf "%s\n" ${deployableidList[@]} ${changedidList[@]} | awk '!seen[$0]++'))