Fix release post script (#2736) (#2737)

(cherry picked from commit 90b4489053)

Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
This commit is contained in:
Mattermost Build 2023-05-26 01:11:53 +03:00 committed by GitHub
parent e8aed2bc26
commit 4392cd25b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -210,6 +210,7 @@ jobs:
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: release/notify-channel - name: release/notify-channel
run: | run: |
git fetch --all
jq --null-input \ jq --null-input \
--arg icon_url "https://mattermost.com/wp-content/uploads/2022/02/icon.png" \ --arg icon_url "https://mattermost.com/wp-content/uploads/2022/02/icon.png" \
--arg username "MattermostRelease" \ --arg username "MattermostRelease" \

View file

@ -2,12 +2,12 @@
set -eu set -eu
VERSION="$1" # such as 5.3.0-rc.1, 5.0.0 VERSION="$1" # such as 5.3.0-rc.1, 5.0.0
LAST_VERSION="$(git for-each-ref --sort=creatordate --format '%(refname)' refs/tags | grep "v[0-9]\.[0-9]\.[0-9]" | grep -v mas | tail -2 | head -1 | sed "s/refs\/tags\/v//")" LAST_VERSION="$(git for-each-ref --sort=creatordate --format '%(refname)' refs/tags | grep "v[0-9]\.[0-9]\.[0-9]" | grep -v mas | grep -v "v$VERSION" | tail -1 | sed "s/refs\/tags\/v//")"
cat <<-MD cat <<-MD
### [v$VERSION](https://github.com/mattermost/desktop/releases/tag/v$VERSION) :tada: ### [v$VERSION](https://github.com/mattermost/desktop/releases/tag/v$VERSION) :tada:
Changes: Changes:
$(git cherry -v v$LAST_VERSION | grep ^+ | grep "(#[0-9]\+)" | sed "s/^+\s[a-zA-Z0-9]\+\s/- /" | sed "s/\s(#\([0-9]\+\))$/ [(#\1)](https:\/\/github.com\/mattermost\/desktop\/pull\/\1)/" | sed "s/\[\?MM-\([0-9]\+\)\]\?/[[MM-\1]](https:\/\/mattermost.atlassian.net\/browse\/MM-\1)/") $(git cherry -v v$LAST_VERSION v$VERSION | grep ^+ | grep "(#[0-9]\+)" | sed "s/^+\s[a-zA-Z0-9]\+\s/- /" | sed "s/\s(#\([0-9]\+\))$/ [(#\1)](https:\/\/github.com\/mattermost\/desktop\/pull\/\1)/" | sed "s/\[\?MM-\([0-9]\+\)\]\?/[[MM-\1]](https:\/\/mattermost.atlassian.net\/browse\/MM-\1)/")
The release will be available on GitHub shortly. The release will be available on GitHub shortly.
MD MD