Skip to content

Commit

Permalink
update changelog.sh to check the image tag before releasing the chart
Browse files Browse the repository at this point in the history
  • Loading branch information
aureq committed Oct 8, 2022
1 parent 8d58456 commit e4d583e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/scripts/changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ PREVIOUS_VERSION="$(git for-each-ref --format="%(refname)" --sort=-creatordate -

CHART_VERSION="$(cat "$CHART_DIR/Chart.yaml" | sed '/^version:/!d; s/^version: \(.*\)/\1/g; s/"//g;')"
CHART_APPVERSION="$(cat "$CHART_DIR/Chart.yaml" | sed '/^appVersion:/!d; s/^appVersion: \(.*\)/\1/g; s/"//g;')"
VALUES_TAG="$(cat "$CHART_DIR/values.yaml" | sed '/^ tag:/!d; s/^ tag: \(.*\)/\1/g; s/"//g;')"

if [ "$CURRENT_VERSION" != "$CHART_VERSION" -o "$CURRENT_VERSION" != "$CHART_APPVERSION" ]; then
if [ "$CURRENT_VERSION" != "$CHART_VERSION" -o "$CURRENT_VERSION" != "$CHART_APPVERSION" -o "$CURRENT_VERSION" != "$VALUES_TAG" ]; then
echo "Version mismatch. The following values should match."
echo "$CHART_DIR/Chart.yaml: appVersion: $CHART_APPVERSION"
echo "$CHART_DIR/Chart.yaml: version: $CHART_VERSION"
echo "$CHART_DIR/values.yaml: tag: $VALUES_TAG"
echo "Command: $CURRENT_VERSION"
exit 1
fi
Expand Down

0 comments on commit e4d583e

Please sign in to comment.