Skip to content

Commit

Permalink
pass in version to release-body.sh
Browse files Browse the repository at this point in the history
Co-authored-by: Jan Ainali <[email protected]>
  • Loading branch information
ericherman and Ainali committed Jul 20, 2023
1 parent 52f0c7f commit dfcce5c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: create-artifact.pdf
run: weasyprint --presentational-hints index.html artifact.pdf
- name: create-release-body
run: script/release-body.sh
run: script/release-body.sh ${{ steps.trim-and-set-release-tag.outputs.RELEASE_TAG }}
- name: set-git-user-email
run: git config user.email "[email protected]"
- name: set-git-user-name
Expand Down
10 changes: 7 additions & 3 deletions script/release-body.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ if [ "_${VERBOSE}_" != "__" ] && [ "$VERBOSE" -gt 0 ]; then
set -x
fi

VERSION=$RELEASE_TAG

echo "# Standard for Public Code version $VERSION" > release.body
CODEBASE_NAME=Release Creates Commit
VERSION=$1
if [ "_${VERSION}_" == "__" ]; then
echo "No version?"
exit 1
fi
echo "# $CODEBASE_NAME version $VERSION" > release.body

# strip the trailing version info if exists, e.g: '1.2.3-rc2' becomes '1.2.3'
BASE_VERSION=$( echo "$VERSION" | sed 's/^\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/' )
Expand Down

0 comments on commit dfcce5c

Please sign in to comment.