Pull request #55: add master to non-dev branches

Merge in RR/pyinfra from bugfix/add-master-to-non-dev-branches to master

* commit 'c94604cc666ec4a9d3803c949f228cbf4291aaf2':
  add master to non-dev branches
This commit is contained in:
Francisco Schulz 2022-11-16 10:44:43 +01:00
commit 61efbdaffd

View File

@ -12,7 +12,7 @@ echo "bamboo plan repo 1 branch: $bamboo_planRepository_1_branch"
echo "bamboo build number: $bamboo_buildNumber"
gitVersion=$(git rev-list --tags --max-count=1 | git describe --tags --abbrev=0)
echo "Latest GIT VERSION TAG: $gitVersion"
echo "latest version tag in git: $gitVersion"
# update version in poetry to latest version in git if it is lower
@ -23,25 +23,24 @@ check_poetry_version () {
if [[ $tagCount -gt 0 ]]
then
echo "latest version tag in git: ${gitVersion}"
echo "current version in project: ${projectVersion}"
echo "current version in project: $projectVersion"
if [[ $projectVersion < $gitVersion ]]
then
echo "project version is behind"
echo "setting latest git tag as current version"
poetry version "$gitVersion"
updateVersion=0 # 0 means all is good means true, yes it's weird
elif [[ $projectVersion == $gitVersion ]]
then
echo "project version matches"
echo "keeping the project version"
updateVersion=0
else
echo "project version is higher (aka. has been manually set in pyproject.toml)"
echo "keeping the project version"
updateVersion=1
fi
if [[ $projectVersion < $gitVersion ]]
then
echo "project version is behind"
echo "setting latest git tag as current version"
poetry version "$gitVersion"
updateVersion=0 # 0 means all is good means true, yes it's weird
elif [[ $projectVersion == $gitVersion ]]
then
echo "project version matches"
echo "keeping the project version"
updateVersion=0
else
echo "project version is higher (aka. has been manually set in pyproject.toml)"
echo "keeping the project version"
updateVersion=1
fi
else
updateVersion=1
fi
@ -73,7 +72,7 @@ else
fi
if [[ $bamboo_planRepository_branchName =~ ^(hotfix/|bugfix/|feature/) ]]
if [[ $bamboo_planRepository_branchName =~ ^(master|hotfix/|bugfix/|feature/) ]]
then
newVersion=$(poetry version -s)
else