File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 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"
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
You can’t perform that action at this time.
0 commit comments