Skip to content

Commit

Permalink
Merge pull request #9 from fac/devp/fix-pre-release-handling
Browse files Browse the repository at this point in the history
Version 2.2.0
  • Loading branch information
markpitchless authored Apr 30, 2021
2 parents 5da31dd + 32b2d5a commit 6fe886e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
TODO: v2 changes

## [Unreleased]
## [2.2.0] - 2021-04-30

- Fix: Bug with pre-release:false input getting ignored

## [2.1.0] - 2021-04-30

Expand Down
10 changes: 8 additions & 2 deletions gem-push-action
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,16 @@ GEM_FILE="$1"
push_host="$(parse-gemspec --push-host)"
GEM_HOST="${GEM_HOST:-$push_host}"

if parse-gemspec --is-pre-release && [[ $PRE_RELEASE != true ]];
then
if parse-gemspec --is-pre-release; then
if [[ $PRE_RELEASE != true ]]; then
echo "Ignoring pre-release. To release, pass pre-release: true as an input"
exit 0
fi
else # normal release
if [[ $PRE_RELEASE == true ]]; then
echo "Ignoring release. To release, pass pre-release: false as an input"
exit 0
fi
fi

# Capture as we can't tell why gem push failed from the exit code and it logs
Expand Down

0 comments on commit 6fe886e

Please sign in to comment.