Skip to content

Commit 9b69e69

Browse files
committed
Fix marking of "latest" release on non-latest feature branches (#1404)
Signed-off-by: Jan Lohage <lohage@23technologies.cloud>
1 parent 74835ea commit 9b69e69

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

hack/release/prepare.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ if [[ -e ".git/refs/tags/$tag" ]]; then
4040
fi
4141

4242
# check if there's a release branch of a higher version than what we want to release
43-
minor=$(echo "$version" | grep -oE '[0-9]{1,}$')
44-
nextMinor=$((minor + 1))
45-
nextMinorBranch="release-v$nextMinor"
43+
major=$(echo "$majorAndMinor" | grep -oE '^[0-9]{1,}')
44+
minor=$(echo "$majorAndMinor" | grep -oE '[0-9]{1,}$')
45+
nextMinorBranch="release-v$major.$((minor + 1))"
4646

4747
if [[ -e ".git/refs/tags/$nextMinorBranch" ]]; then
4848
echo "RELEASE_AS_LATEST=false" | tee -a "$GITHUB_ENV"

0 commit comments

Comments
 (0)