aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2025-06-05 13:20:41 +0200
committerGitHub <noreply@github.com>2025-06-05 13:20:41 +0200
commit5e47e126ff514bb5b4e8bcc56ca76f217d72b0e9 (patch)
tree3245886780b5fc28a60d00df7b0c089fd26c3f40
parent0f039576ec3d50f748673d6c63e4dce88e16c1c3 (diff)
parent8ee36d7cefbef21cb8f4a71a841707b88ceaf4c1 (diff)
downloadnextcloud-server-stable31.tar.gz
nextcloud-server-stable31.zip
Merge pull request #53344 from nextcloud/backport/53341/stable31v31.0.6rc1stable31
-rw-r--r--.github/workflows/generate-release-changelog.yml16
1 files changed, 12 insertions, 4 deletions
diff --git a/.github/workflows/generate-release-changelog.yml b/.github/workflows/generate-release-changelog.yml
index 1660b77d974..b8d8e130ba8 100644
--- a/.github/workflows/generate-release-changelog.yml
+++ b/.github/workflows/generate-release-changelog.yml
@@ -42,12 +42,20 @@ jobs:
run: |
cd server
# Print all tags
- git log --decorate --oneline | egrep '^[0-9a-f]+ \((HEAD, )?tag: ' | sed -r 's/^.+tag: ([^ ]+)[,\)].+$/\1/g'
+ git log --decorate --oneline | egrep 'tag: ' | sed -r 's/^.+tag: ([^,\)]+)[,\)].+$/\1/g'
# Get the current tag
- TAGS=$(git log --decorate --oneline | egrep '^[0-9a-f]+ \((HEAD, )?tag: ' | sed -r 's/^.+tag: ([^ ]+)[,\)].+$/\1/g')
+ TAGS=$(git log --decorate --oneline | egrep 'tag: ' | sed -r 's/^.+tag: ([^,\)]+)[,\)].+$/\1/g')
CURRENT_TAG=$(echo "$TAGS" | head -n 1)
- # Get the previous tag that is not an rc, beta or alpha
- PREVIOUS_TAG=$(echo "$TAGS" | grep -v 'rc\|beta\|alpha' | sed -n '2p')
+
+ # Get the previous tag - filter pre-releases only if current tag is stable
+ if echo "$CURRENT_TAG" | grep -q 'rc\|beta\|alpha'; then
+ # Current tag is pre-release, don't filter
+ PREVIOUS_TAG=$(echo "$TAGS" | sed -n '2p')
+ else
+ # Current tag is stable, filter out pre-releases
+ PREVIOUS_TAG=$(echo "$TAGS" | grep -v 'rc\|beta\|alpha' | sed -n '2p')
+ fi
+
echo "CURRENT_TAG=$CURRENT_TAG" >> $GITHUB_ENV
echo "PREVIOUS_TAG=$PREVIOUS_TAG" >> $GITHUB_ENV