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