Skip to content

Commit

Permalink
调整发给telegram的更新日志
Browse files Browse the repository at this point in the history
  • Loading branch information
AoEiuV020 committed Mar 14, 2022
1 parent 2918561 commit 27abd4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
then
CREATE_RELEASE="true"
BUILD_VERSION=${GITHUB_REF#refs/tags/}
RELEASE_BODY=$(./latest-changelog.sh $BUILD_VERSION)
RELEASE_BODY=$(./latest-changelog.sh $BUILD_VERSION |sed '1s/[,,]$//;1s/^\(.*\)$/### \1\n/')
if [[ -z "$RELEASE_BODY" ]]
then
RELEASE_BODY='### ${{ github.event.head_commit.message }}'
fi
TG_CHANGELOG="$RELEASE_BODY"
TG_CHANGELOG=$(./latest-changelog.sh $BUILD_VERSION |sed '/^$/,$d;1d' |sed -n '{;=;p}' | sed "N;s/\n/. /g")
elif [[ ${GITHUB_REF} == refs/pull* ]]
then
CREATE_RELEASE="false"
Expand Down
2 changes: 1 addition & 1 deletion latest-changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ set -e
cd $(dirname $0)
versionName=$1
versionName=${versionName:=$(./latest-version.sh)}
cat ./ChangeLog.txt |sed -n "/$versionName:/,\$p" |sed '/^$/,$d;1d' |sed '1s/[,,]$//;1s/^\(.*\)$/### \1\n/'
cat ./ChangeLog.txt |sed -n "/$versionName:/,\$p" |sed '/^$/,$d;1d'

0 comments on commit 27abd4a

Please sign in to comment.