Skip to content

Commit

Permalink
fix: correct handling of help and version flags
Browse files Browse the repository at this point in the history
  • Loading branch information
adamtabrams committed May 1, 2021
1 parent 9f861ad commit 2f2c674
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions change
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,8 @@ while [ $# != 0 ]; do
"--bump="* ) bump_script="${1#*=}";;
"--token" ) token="$2"; shift;;
"--token="* ) token="${1#*=}";;
"--help" | "-h" ) Usage; exit;;
"--version" | "-v" ) echo "$change_version"; exit;;
* ) echo "invalid argument: $1" >&2; exit 1;;
esac

Expand All @@ -428,8 +430,8 @@ case $command in
"tag" ) Make_and_push_tag;;
"post" ) Post_release;;
"all" ) Run_all;;
"help" | "--help" | "-h" ) Usage;;
"version" | "--version" | "-v" ) echo "$change_version";;
"help" ) Usage;;
"version" ) echo "$change_version";;
* ) echo "invalid command: $command" >&2; exit 1;;
esac

Expand Down

0 comments on commit 2f2c674

Please sign in to comment.