Skip to content

Commit

Permalink
Fix the last tag generation in release yaml (#428)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpanchajanya authored Jul 25, 2023
1 parent 2c7ae0f commit 623c3ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,18 @@ jobs:
if [ "$revision" -gt 0 ];then
revision=$(($revision-1))
RELEASE_BRANCH="release-${major}.${minor}"
LAST_TAG="v${major}.${minor}.${revision}"
elif [ "$minor" -gt 0 ]; then
minor=$(($minor-1))
LAST_TAG=$(git tag | grep -E "^v${major}\.${minor}\.[0-9]+$" | tail -1)
elif [ "$major" -gt 0 ]; then
major=$(($major-1))
LAST_TAG=$(git tag | grep -E "^v${major}\.[0-9]+\.[0-9]+$" | tail -1)
else
echo "Please validate that the tag release version(${RELEASE_VERSION}) conforms to semver."
exit 1
fi
git log -3 --format=oneline
LAST_TAG="v${major}.${minor}.${revision}"
echo "Last release tag - $LAST_TAG"
START_SHA=$(git rev-list -n 1 $LAST_TAG)
echo "Release note generator start SHA - $START_SHA"
Expand Down

0 comments on commit 623c3ee

Please sign in to comment.