Skip to content

Commit

Permalink
Merge pull request #19 from TNG/allow_non_dry_run_for_release_scripts
Browse files Browse the repository at this point in the history
fix: allow non dry-run
  • Loading branch information
NiklasEi authored Jul 16, 2021
2 parents 966d06c + 3855ffa commit c322c3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions prepare_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ RELEASE_BRANCH="${VERSION_PREFIXED}-release"
git branch "$RELEASE_BRANCH"
git checkout "$RELEASE_BRANCH"

if [[ $DRY_RUN ]]; then
if [[ $DRY_RUN = 1 ]]; then
echo "Preparing release of version $VERSION (dry-run)"
else
echo "Preparing release of version $VERSION"
Expand All @@ -70,7 +70,7 @@ npm run test
echo "Creating Tag"
git tag -a -m "$VERSION_PREFIXED" "$VERSION_PREFIXED"

if [[ $DRY_RUN ]]; then
if [[ $DRY_RUN = 1 ]]; then
echo "Pushing version and tag to GitHub repository (dry-run)"
git push --set-upstream "$UPSTREAM_URL" "$RELEASE_BRANCH" --dry-run
git push "$UPSTREAM_URL" "$VERSION_PREFIXED" --dry-run
Expand Down
4 changes: 2 additions & 2 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ if [ ! -n "$(sed -n -e "/\"version\": \"${VERSION}\"/ p" package.json)" ]; then
exit 1
fi

if [[ $DRY_RUN ]]; then
if [[ $DRY_RUN = 1 ]]; then
echo "Releasing version $VERSION (dry-run)"
else
echo "Releasing version $VERSION"
Expand All @@ -62,7 +62,7 @@ npm run lint
npm run build
npm run test

if [[ $DRY_RUN ]]; then
if [[ $DRY_RUN = 1 ]]; then
echo "Publish to npmjs (dry-run)"
npm publish --access public --registry https://registry.npmjs.org/ --dry-run
else
Expand Down

0 comments on commit c322c3f

Please sign in to comment.