Skip to content

Commit

Permalink
correct get actual version
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-duval-ankorstore committed Feb 14, 2022
1 parent 79f60a8 commit 67354c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ defaultNewVersionReplicas=2
function get_running_version {
local tempVersion=$(kubectl get cm $applicationName-cm -n $namespace -o template --template={{.data.runningVersion}})
# strict semver check + v prefix https://regexr.com/39s32
if [[ $tempVersion =~ ^staging-v{1}.* ]] || [[ $tempVersion =~ ^v{1}.* ]] || [[ $tempVersion == "staging" ]]; then
if [[ $tempVersion =~ ^(staging|$namespace)-v{1}.* ]] || [[ $tempVersion =~ ^v{1}.* ]] || [[ $tempVersion == "staging" ]]; then
actualVersion=$tempVersion
fi
echo "Actual version from get running version function: $actualVersion";
}

##############################################################
################### Init and security ########################
##############################################################
Expand Down

0 comments on commit 67354c6

Please sign in to comment.