From c8c021094518a8dd61fa45072dcf471e3afed5cc Mon Sep 17 00:00:00 2001 From: Francisco Schulz Date: Tue, 15 Nov 2022 15:41:12 +0100 Subject: [PATCH] echo latest git version tag --- bamboo-specs/src/main/resources/scripts/git-tag.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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}"