Skip to content

Commit 5b566d7

Browse files
fix: rc release calculator for new branches (#2028)
Signed-off-by: matttrach <matt.trachier@suse.com> Co-authored-by: Matt Trachier <matt.trachier@suse.com>
1 parent cffd050 commit 5b566d7

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,12 @@ jobs:
343343
echo "Latest rc num: $LATEST_RC_NUM"
344344
if [ -z "$LATEST_RC_NUM" ]; then
345345
# the last minor was a full release, we need to start the next minor release candidate
346-
# this sort of assumes there wont be a patch release
347-
LATEST_MINOR_NUM=$((LATEST_MINOR_NUM + 1))
346+
if [ -z "$LATEST_MINOR_NUM" ]; then
347+
# this is a new minor branch
348+
LATEST_MINOR_NUM=0
349+
else
350+
LATEST_MINOR_NUM=$((LATEST_MINOR_NUM + 1))
351+
fi
348352
LATEST_PATCH_NUM=0
349353
NEXT_RC_NUM=0
350354
else

0 commit comments

Comments
 (0)