Improve the bump tool
This commit is contained in:
parent
ac2ec585f6
commit
8ce8fc780f
1 changed files with 16 additions and 1 deletions
|
@ -44,7 +44,7 @@ check() {
|
|||
fi
|
||||
|
||||
# ensure the current branch is 'master'
|
||||
if [[ "$(git branch --show-current)" != "master" ]]; then
|
||||
if [[ "$(git branch --show-current)" != "master" && manual_release == "false" ]]; then
|
||||
echo "Error: This operation must be performed on the 'master' branch!"
|
||||
exit -1
|
||||
fi
|
||||
|
@ -147,6 +147,17 @@ release() {
|
|||
|
||||
}
|
||||
|
||||
help() {
|
||||
echo "Bump new version to Chirpy project"
|
||||
echo "Usage:"
|
||||
echo
|
||||
echo " bash /path/to/bump.sh [options]"
|
||||
echo
|
||||
echo "Options:"
|
||||
echo " -m, --manual Manual relase, bump version only."
|
||||
echo " -h, --help Print this help information."
|
||||
}
|
||||
|
||||
main() {
|
||||
check
|
||||
|
||||
|
@ -179,6 +190,10 @@ while (($#)); do
|
|||
manual_release=true
|
||||
shift
|
||||
;;
|
||||
-h | --help)
|
||||
help
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "unknown option '$opt'!"
|
||||
exit 1
|
||||
|
|
Loading…
Reference in a new issue