File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,19 +14,17 @@ if [ -n "$(git branch --list hotfix/*)" ]; then
1414 flow=hotfix
1515 name=$( git branch --list hotfix/* | sed ' s/.*hotfix\///' | head -n1 )
1616 zz_log i " Hotfix branch found: {Yellow $name }"
17- fi
1817
19- # Check if on a release branch and extract branch name
20- if [ -n " $( git branch --list release/ * ) " ]; then
18+ # Check for .git/RELEASE file if no flow branch found
19+ elif [ -z " $flow " ] && [ -f .git/RELEASE ]; then
2120 flow=release
22- name=$( git branch --list release/ * | sed ' s/.*release\/// ' | head -n1 )
21+ name=$( cat .git/RELEASE )
2322 zz_log i " Release branch found: {Blue $name }"
24- fi
2523
26- # Check if a flow branch is found from .git/RELEASE file
27- if [ -z " $flow " ] && [ -f .git/RELEASE ]; then
24+ # Check if on a release branch and extract branch name
25+ elif [ -n " $( git branch --list release/ * ) " ]; then
2826 flow=release
29- name=$( cat .git/RELEASE )
27+ name=$( git branch --list release/ * | sed ' s/.*release\/// ' | head -n1 )
3028 zz_log i " Release branch found: {Blue $name }"
3129fi
3230
You can’t perform that action at this time.
0 commit comments