mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
Fixing edge case for patch version of 0 (#3063)
When the array splitting happen there are cases where the patch (maj.min.patch) is 0. Using ++ to increment that 0 causes a return code of 1. Using +=1 instead increments the value but has a return code of 0.
This commit is contained in:
committed by
k8s-ci-robot
parent
44d306e26c
commit
7cbb848a75
@@ -51,7 +51,7 @@ semvercompare() {
|
||||
# No pre-release was found so we increment the patch version and attach a
|
||||
# -0 to enable pre-releases being found.
|
||||
local ov=( ${semvercompareOldVer//./ } ) # Turn the version into an array
|
||||
((ov[2]++)) # Increment the patch release
|
||||
((ov[2]+=1)) # Increment the patch release
|
||||
out=$(vert ">${ov[0]}.${ov[1]}.${ov[2]}-0" $semvercompareNewVer)
|
||||
ret=$?
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user