Skip to content

Commit

Permalink
(maint) update scripts/release/release.sh (#199)
Browse files Browse the repository at this point in the history
- use  $(...) over `...` (backticks) because it is the legacy syntax required by only the very oldest of non-POSIX-compatible bourne-shells
- remove un-used `START_DIR` variable
- use `printf` bringing it up to date with the rest of the script and honors the `\n` without needing a `-e` flag.
  • Loading branch information
vladdoster authored Aug 4, 2021
1 parent d5c49df commit 9792c20
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/release/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ function pleaseUseGNUsed {
function init {
sed --version > /dev/null || pleaseUseGNUsed

DATE=`date '+%B %d, %Y'`
START_DIR=`pwd`
DATE=$(date '+%B %d, %Y')

if [ "$CI" = true ] ; then
GPG_KEY_ID=C6DC8F8C8E78B36A
Expand All @@ -37,7 +36,7 @@ semverRegex='\([0-9]\+\.[0-9]\+\.[0-9]\+\)\(-\?\)\([0-9a-zA-Z.]\+\)\?'
function getTargetVersion {
# parse target version from CHANGELOG
sed -n 's/^# '"$semverRegex"' (Unreleased)$/\1\2\3/p' CHANGELOG.md || \
(echo "\nTarget version not found in changelog, exiting" && \
(printf "\nTarget version not found in changelog, exiting" && \
exit 1)
}

Expand Down

0 comments on commit 9792c20

Please sign in to comment.