Skip to content

Commit

Permalink
Add --help for set_version
Browse files Browse the repository at this point in the history
  • Loading branch information
maurolacy committed Mar 9, 2022
1 parent 44f65e6 commit 592e315
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/set_version.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
command -v shellcheck > /dev/null && shellcheck "$0"
command -v shellcheck >/dev/null && shellcheck "$0"

function print_usage() {
echo "Usage: $0 NEW_VERSION"
echo ""
echo "e.g. $0 0.8.0"
echo "Usage: $0 [-h|--help] <new_version>"
echo "e.g.: $0 0.8.0"
}

if [ "$#" -ne 1 ]; then
if [ "$#" -ne 1 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]
then
print_usage
exit 1
fi
Expand Down

0 comments on commit 592e315

Please sign in to comment.