From d0347e11fd2ab07652d357a541eae32dcd74b74f Mon Sep 17 00:00:00 2001 From: DannyDarwiche Date: Thu, 22 Jul 2021 13:50:12 +0200 Subject: [PATCH] Add release.sh script Fixes #44 > Workflow: Release notes are now generated automatically --- .buildscripts/release-notes.sh | 2 +- .buildscripts/release.sh | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .buildscripts/release.sh diff --git a/.buildscripts/release-notes.sh b/.buildscripts/release-notes.sh index 47ad81d..fbd1ffb 100644 --- a/.buildscripts/release-notes.sh +++ b/.buildscripts/release-notes.sh @@ -37,4 +37,4 @@ FORMAT_ENTRY_INFO="- \3 (\2)" git log $(git describe --abbrev=0)..HEAD | \ grep -E "$MATCH_ENTRY_LINE" | \ sed -e "s/$CAPTURE_ENTRY_INFO/$FORMAT_ENTRY_INFO/g" | \ - sort \ No newline at end of file + sort diff --git a/.buildscripts/release.sh b/.buildscripts/release.sh new file mode 100644 index 0000000..a0ffcb3 --- /dev/null +++ b/.buildscripts/release.sh @@ -0,0 +1,16 @@ +echo Input version number using semantic versioning, e.g. '0.1.2' +read tag + +echo Generating release notes... +echo Creating tag... +./.buildscripts/release-notes.sh | git tag -a $tag --file - + +echo "Push release tag? [y/n]" +read push +if [[ $push == y* ]]; then + echo "Pushing tag..." + git push origin $tag +else + echo "Skipped pushing tag." +fi +echo "All done!"