Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ jobs:
run: |
TAG=$(git describe --always --match "v*" --abbrev=7)
# Zero fill out the number of commits since the last tag. This allows helm to do a proper sorting of semver rc tags which are sorted alphanumerically.
ZERO_FILLED_TAG=$(LAST_TAG=$(git describe --abbrev=0); N=$(git rev-list "$LAST_TAG".. --count); REF=$(git rev-parse --short=8 HEAD); printf "$LAST_TAG-%05d-g$REF" $N)
# Also the `r` is important as helm's and some other semver parsers do not allow the "rc" bit of the tag to start with a zero.
ZERO_FILLED_TAG=$(LAST_TAG=$(git describe --abbrev=0); N=$(git rev-list "$LAST_TAG".. --count); REF=$(git rev-parse --short=8 HEAD); printf "$LAST_TAG-r%05d-g$REF" $N)
SEMVER_TAG=$(awk -F'v|-g' '{print $2}' <<< $ZERO_FILLED_TAG)
echo "::set-output name=tag::$TAG"
echo "::set-output name=zero_filled_tag::$ZERO_FILLED_TAG"
Expand Down