File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ if [ -f .git/RELEASE ] && [ -n "$(git branch --list release/* | grep -v $(cat .g
1010fi
1111
1212# ### GET BUMP VERSION
13- GBV=$( gitversion -config .gitversion -showvariable MajorMinorPatch | tee .git/RELEASE)
13+ GBV=$( gv -showvariable MajorMinorPatch | tee .git/RELEASE)
1414
1515# ### PREVENT GIT EDITOR PROMPT
1616GIT_EDITOR=:
Original file line number Diff line number Diff line change 33# ### Goto repository root
44cd " $( git rev-parse --show-toplevel) " > /dev/null
55
6- # ### GET last vX.Y.Z tag on the main branch
7- last=$( git describe --tags --abbrev=0 --match " v[0-9]*.[0-9]*.[0-9]*" main | sed ' s/^v//' )
6+ # Parse arguments and print help if needed
7+ eval $(
8+ zz_args " Create HotFix branch" $0 " $@ " << -help
9+ help
10+ )
11+
12+ # ### GET last vX.Y.Z tag on the main branch, removing the leading 'v' and replacing last number with 'X'
13+ current=$( git describe --tags --abbrev=0 --match " v[0-9]*.[0-9]*.[0-9]*" main | sed -e ' s/^v//' -e ' s/\.[0-9]*$/.X/' )
814
915# ### SAVE CURRENT STATUS
10- git stash save --include-untracked " Before hotfix/ $last "
16+ git stash --include-untracked --message " Before $current " --keep-index
1117
1218# ### PREVENT GIT EDITOR PROMPT
1319GIT_EDITOR=:
1420
1521# ### START HOTFIX
16- git flow hotfix start $last
22+ git flow hotfix start $current
1723
1824# ### RESTORE STATUS
1925git stash apply
Original file line number Diff line number Diff line change 4444zz_log s " On branch: {Blue $flow /$name }"
4545
4646# Get the new version from gitversion
47- GBV=$( gitversion -config .gitversion -showvariable MajorMinorPatch)
47+ GBV=$( gv -showvariable MajorMinorPatch)
4848if [ -z " $GBV " ]; then
4949 zz_log e " Cannot get version from .gitversion"
5050 exit 1
You can’t perform that action at this time.
0 commit comments