1 parent b555f46 commit 14ae58cCopy full SHA for 14ae58c
1 file changed
Versioning/version.ps1
@@ -1,9 +1,9 @@
1
-$buildSalt = $Env:BUILD_NUMBER
2
-$gitVersion = git describe --tags
+$buildSalt = $Env.BUILD_NUMBER
+$branchName = $Env.BRANCH_NAME
3
$gitSimpleVersion = git describe --tags --abbrev=0
4
$simpleVersionStandard = echo $gitSimpleVersion | Select-String -Pattern "([0-9]+)\.([0-9]+)\.([0-9]+)" | % {$_.Matches} | %{$_.Groups[1].Value+"."+$_.Groups[2].Value+"."+$_.Groups[3].Value}
5
$dotNetVersion = "$simpleVersionStandard.$buildSalt"
6
-$infoVersion = "$gitSimpleVersion" -replace "([0-9]+)\.([0-9]+)\.([0-9]+)","$dotNetVersion" + "$Env.BRANCH_NAME"
+$infoVersion = -join(("$gitSimpleVersion" -replace "([0-9]+)\.([0-9]+)\.([0-9]+)","$dotNetVersion"), "-", "$branchName")
7
8
$fileContent = @"
9
using System.Reflection;
0 commit comments