File tree Expand file tree Collapse file tree 1 file changed +16
-8
lines changed
Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change 1414
1515set -eu
1616
17- opt_pre=false # preview mode option
17+ opt_pre=false # preview mode option
18+ opt_skip_ver=false # option for skip versioning
1819
1920working_branch=" $( git branch --show-current) "
2021
@@ -48,6 +49,7 @@ help() {
4849 echo " bash ./tools/release.sh [options]"
4950 echo
5051 echo " Options:"
52+ echo " -k, --skip-versioning Skip the step of generating the version number."
5153 echo " -p, --preview Enable preview mode, only package, and will not modify the branches"
5254 echo " -h, --help Print this information."
5355}
@@ -170,13 +172,15 @@ release() {
170172}
171173
172174main () {
173- check
174-
175- # auto-generate a new version number to the file 'package.json'
176- if $opt_pre ; then
177- standard-version --prerelease rc
178- else
179- standard-version
175+ if [[ $opt_skip_ver = false ]]; then
176+ check
177+
178+ # auto-generate a new version number to the file 'package.json'
179+ if $opt_pre ; then
180+ standard-version --prerelease rc
181+ else
182+ standard-version
183+ fi
180184 fi
181185
182186 _version=" $( grep ' "version":' package.json | sed ' s/.*: "//;s/".*//' ) "
@@ -201,6 +205,10 @@ while (($#)); do
201205 opt_pre=true
202206 shift
203207 ;;
208+ -k | --skip-versioning)
209+ opt_skip_ver=true
210+ shift
211+ ;;
204212 -h | --help)
205213 help
206214 exit 0
You can’t perform that action at this time.
0 commit comments