From 3f35a05c6dd21814d827a6ce9932a6284c3a87c3 Mon Sep 17 00:00:00 2001 From: Adam Hellberg Date: Sat, 5 Sep 2015 22:02:39 +0200 Subject: [PATCH] Update version script --- set_tc_version.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/set_tc_version.ps1 b/set_tc_version.ps1 index a9b80ba7..4ee006ec 100644 --- a/set_tc_version.ps1 +++ b/set_tc_version.ps1 @@ -1,11 +1,12 @@ -$buildCounter = "%build.counter%" -$branch = "%teamcity.build.branch%" +$buildCounter = "$env:build_counter" +$branch = "$env:teamcity_build_branch" $prefix = 'refs/heads/' $tagPrefix = 'refs/tags/' $isTag = False $friendlyVersion = '0.0.0' +$buildNumber = "${friendlyVersion}.${buildCounter}" if ($branch.StartsWith($prefix)) { @@ -17,6 +18,7 @@ elseif ($branch.StartsWith($tagPrefix)) $isTag = True } +Write-Host "Build counter: $buildCounter" Write-Host "Branch: $branch" if ($branch -eq 'master') @@ -40,5 +42,5 @@ Write-Host "##teamcity[setParameter name='Version' value='$friendlyVersion']" if (!$isTag) { - Write-Host "##teamcity[setParameter name='InfoVersion' value='$friendlyVersion-$branch]" + Write-Host "##teamcity[setParameter name='InfoVersion' value='$friendlyVersion-$branch']" }