Skip to content

Commit b19570c

Browse files
committed
helm-chart publish: Fix sorting for release candidates
Noticed in https://buildkite.com/materialize/deploy/builds/20108#019a97da-d657-43bb-9f66-a5dee26d3476
1 parent 0a0ee6a commit b19570c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

misc/helm-charts/publish.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ if ! is_truthy "$CI_DRY_RUN"; then
122122
exit 1
123123
fi
124124

125-
HIGHEST_HELM_CHART_VERSION=$(echo "$YAML" | yq '.entries["materialize-operator"][].version' | grep -v beta | sort -V | tail -n 1)
125+
# sort -V doesn't do a proper semver sort, have to manually fix that, v26.0.0~rc.6 is considered to be less than v26.0.0
126+
HIGHEST_HELM_CHART_VERSION=$(echo "$YAML" | yq '.entries["materialize-operator"][].version' | grep -v beta | sed "s/-rc\./~rc./" | sort -V | tail -n 1)
126127

127128
if [ "$HIGHEST_HELM_CHART_VERSION" != "$BUILDKITE_TAG" ]; then
128129
echo "--- Higher helm-chart version $HIGHEST_HELM_CHART_VERSION > $BUILDKITE_TAG has already been released, not bumping terraform versions"

0 commit comments

Comments
 (0)