Skip to content

Commit 73ad376

Browse files
authored
Merge pull request #5572 from wso2/himeshsiriwardana-patch-8
Updates to the Hotfix action
2 parents e2eb151 + 28528f5 commit 73ad376

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/release-docs.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,14 @@ jobs:
5252
set -euxo pipefail
5353
IFS='.' read -r MAJOR MINOR PATCH <<< "${{ env.CURRENT_VERSION }}"
5454
echo "Current version: MAJOR=$MAJOR, MINOR=$MINOR, PATCH=$PATCH"
55-
PATCH=$((PATCH+1))
55+
56+
# increment version if this is not a hotfix or keep the current version
57+
if [[ "${{ env.IS_HOTFIX }}" != "true" ]]; then
58+
PATCH=$((PATCH+1))
59+
echo "Version is auto incremented."
60+
fi
61+
5662
NEW_VERSION="${MAJOR}.${MINOR}.${PATCH}"
57-
echo "Version is auto incremented."
5863
fi
5964
6065
echo "New version: $NEW_VERSION"
@@ -79,8 +84,8 @@ jobs:
7984
hotfix_release_tag=${{ env.NEW_VERSION }}-hotfix-$next_hotfix_no
8085
echo "Hotfix release tag: $hotfix_release_tag"
8186
82-
# strip prepending 'v'
83-
NEW_VERSION=$(echo $hotfix_release_tag | sed 's/^v//')
87+
# set the new version to the hotfix version
88+
NEW_VERSION=$(echo $hotfix_release_tag)
8489
8590
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
8691

0 commit comments

Comments
 (0)