mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-06-08 00:27:58 +00:00
Improve the bump tool
This commit is contained in:
parent
ac2ec585f6
commit
8ce8fc780f
@ -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…
x
Reference in New Issue
Block a user