Skip to content

Commit

Permalink
Merge pull request anothrNick#79 from fermoya/fix/default-none-failure
Browse files Browse the repository at this point in the history
Fix: Exiting when default bump set to none
  • Loading branch information
anothrNick authored Sep 14, 2020
2 parents 9aaabdb + 78fc6cb commit 68fcf87
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,24 +60,19 @@ fi

echo $log

# this will bump the semvar using the default bump level,
# or it will simply pass if the default was "none"
function default-bump {
if [ "$default_semvar_bump" == "none" ]; then
echo "Default bump was set to none. Skipping..."
exit 0
else
semver bump "${default_semvar_bump}" $tag
fi
}

# get commit logs and determine home to bump the version
# supports #major, #minor, #patch (anything else will be 'minor')
case "$log" in
*#major* ) new=$(semver bump major $tag); part="major";;
*#minor* ) new=$(semver bump minor $tag); part="minor";;
*#patch* ) new=$(semver bump patch $tag); part="patch";;
* ) new=$(default-bump); part=$default_semvar_bump;;
* )
if [ "$default_semvar_bump" == "none" ]; then
echo "Default bump was set to none. Skipping..."; exit 0
else
new=$(semver bump "${default_semvar_bump}" $tag); part=$default_semvar_bump
fi
;;
esac

echo $part
Expand Down

0 comments on commit 68fcf87

Please sign in to comment.