Release script: Check if git flow is enabled

This commit is contained in:
Benoit Marty 2022-11-30 10:00:12 +01:00 committed by Benoit Marty
parent 93a34d953f
commit b0029f2dd3
1 changed files with 11 additions and 0 deletions

View File

@ -38,6 +38,17 @@ if [[ ! -f ${releaseScriptFullPath} ]]; then
exit 1
fi
# Check if git flow is enabled
git flow config >/dev/null 2>&1
if [[ $? == 0 ]]
then
printf "Git flow is initialized"
else
printf "Git flow is not initialized. Initializing...\n"
# All default value, just set 'v' for tag prefix
git flow init -d -t 'v'
fi
# Guessing version to propose a default version
versionMajorCandidate=`grep "ext.versionMajor" ./vector-app/build.gradle | cut -d " " -f3`
versionMinorCandidate=`grep "ext.versionMinor" ./vector-app/build.gradle | cut -d " " -f3`