diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2025-06-05 13:20:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-05 13:20:41 +0200 |
commit | 5e47e126ff514bb5b4e8bcc56ca76f217d72b0e9 (patch) | |
tree | 3245886780b5fc28a60d00df7b0c089fd26c3f40 | |
parent | 0f039576ec3d50f748673d6c63e4dce88e16c1c3 (diff) | |
parent | 8ee36d7cefbef21cb8f4a71a841707b88ceaf4c1 (diff) | |
download | nextcloud-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.yml | 16 |
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 |