build: add skip-versioning
option for release tool
Allow change the `CHANGELOG.md`
This commit is contained in:
parent
339293d0d7
commit
df8185f887
1 changed files with 15 additions and 7 deletions
|
@ -15,6 +15,7 @@
|
|||
set -eu
|
||||
|
||||
opt_pre=false # preview mode option
|
||||
opt_skip_ver=false # option for skip versioning
|
||||
|
||||
working_branch="$(git branch --show-current)"
|
||||
|
||||
|
@ -48,6 +49,7 @@ help() {
|
|||
echo " bash ./tools/release.sh [options]"
|
||||
echo
|
||||
echo "Options:"
|
||||
echo " -k, --skip-versioning Skip the step of generating the version number."
|
||||
echo " -p, --preview Enable preview mode, only package, and will not modify the branches"
|
||||
echo " -h, --help Print this information."
|
||||
}
|
||||
|
@ -170,6 +172,7 @@ release() {
|
|||
}
|
||||
|
||||
main() {
|
||||
if [[ $opt_skip_ver = false ]]; then
|
||||
check
|
||||
|
||||
# auto-generate a new version number to the file 'package.json'
|
||||
|
@ -178,6 +181,7 @@ main() {
|
|||
else
|
||||
standard-version
|
||||
fi
|
||||
fi
|
||||
|
||||
_version="$(grep '"version":' package.json | sed 's/.*: "//;s/".*//')"
|
||||
|
||||
|
@ -201,6 +205,10 @@ while (($#)); do
|
|||
opt_pre=true
|
||||
shift
|
||||
;;
|
||||
-k | --skip-versioning)
|
||||
opt_skip_ver=true
|
||||
shift
|
||||
;;
|
||||
-h | --help)
|
||||
help
|
||||
exit 0
|
||||
|
|
Loading…
Reference in a new issue