Skip to content

Commit b9d97f2

Browse files
authored
Merge pull request #54523 from nextcloud/fix/changelog-gen
2 parents acf04ff + f304b80 commit b9d97f2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/generate-release-changelog.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,13 @@ jobs:
4747
TAGS=$(git log --decorate --oneline | egrep 'tag: ' | sed -r 's/^.+tag: ([^,\)]+)[,\)].+$/\1/g')
4848
CURRENT_TAG=$(echo "$TAGS" | head -n 1)
4949
50+
# If current tag is the first beta, we use the previous major RC1
51+
if echo "$CURRENT_TAG" | grep -q 'beta1'; then
52+
MAJOR=$(echo "$CURRENT_TAG" | sed -E 's/^v([0-9]+).*/\1/')
53+
PREV=$((MAJOR - 1))
54+
PREVIOUS_TAG="v${PREV}.0.0rc1"
5055
# Get the previous tag - filter pre-releases only if current tag is stable
51-
if echo "$CURRENT_TAG" | grep -q 'rc\|beta\|alpha'; then
56+
elif echo "$CURRENT_TAG" | grep -q 'rc\|beta\|alpha'; then
5257
# Current tag is pre-release, don't filter
5358
PREVIOUS_TAG=$(echo "$TAGS" | sed -n '2p')
5459
else

0 commit comments

Comments
 (0)