diff --git a/bamboo-specs/src/main/resources/scripts/git-tag.sh b/bamboo-specs/src/main/resources/scripts/git-tag.sh index b250da1..3193f05 100755 --- a/bamboo-specs/src/main/resources/scripts/git-tag.sh +++ b/bamboo-specs/src/main/resources/scripts/git-tag.sh @@ -11,6 +11,10 @@ echo "bamboo version tag: $bamboo_version_tag" 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" + + # update version in poetry to latest version in git if it is lower # semver regex pattern: (\d+)\.(\d+)\.(\d+)([a-zA-Z\d]*)?-?(dev\d*|post\d*)? check_poetry_version () { @@ -19,7 +23,6 @@ check_poetry_version () { if [[ $tagCount -gt 0 ]] then - gitVersion=$(git rev-list --tags --max-count=1 | git describe --tags --abbrev=0) echo "latest version tag in git: ${gitVersion}" echo "current version in project: ${projectVersion}"