Skip to content

Commit

Permalink
Do not update the chart version if there was an error bumping it
Browse files Browse the repository at this point in the history
  • Loading branch information
gildas committed Sep 3, 2021
1 parent 8cfce3a commit 42d4dc2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion hooks/filter-flow-release-start-version
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ fi
if [[ -f $ROOT_DIR/chart/Chart.yaml ]]; then
CHART_VERSION=$(grep "^version:" $ROOT_DIR/chart/Chart.yaml | sed -E "s/^version:\s+([0-9]+\.[0-9]+\.[0-9]+)/\1/")
CHART_VERSION=$(bump_version $CHART_VERSION $LEVEL)
sed -Ei "/^version:/s/[0-9]+\.[0-9]+\.[0-9]/${CHART_VERSION}/" "$ROOT_DIR/chart/Chart.yaml"
status=$?
if (( ! status )); then
sed -Ei "/^version:/s/[0-9]+\.[0-9]+\.[0-9]/${CHART_VERSION}/" "$ROOT_DIR/chart/Chart.yaml"
else
warn "Helm Chart Version was not modified"
fi
sed -Ei "/^appVersion:/s/[0-9]+\.[0-9]+\.[0-9]/${VERSION}/" "$ROOT_DIR/chart/Chart.yaml"
git stash push --quiet
fi
Expand Down

0 comments on commit 42d4dc2

Please sign in to comment.