Skip to content

Commit 14ae58c

Browse files
committed
Versioning should work now
1 parent b555f46 commit 14ae58c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎Versioning/version.ps1‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
$buildSalt = $Env:BUILD_NUMBER
2-
$gitVersion = git describe --tags
1+
$buildSalt = $Env.BUILD_NUMBER
2+
$branchName = $Env.BRANCH_NAME
33
$gitSimpleVersion = git describe --tags --abbrev=0
44
$simpleVersionStandard = echo $gitSimpleVersion | Select-String -Pattern "([0-9]+)\.([0-9]+)\.([0-9]+)" | % {$_.Matches} | %{$_.Groups[1].Value+"."+$_.Groups[2].Value+"."+$_.Groups[3].Value}
55
$dotNetVersion = "$simpleVersionStandard.$buildSalt"
6-
$infoVersion = "$gitSimpleVersion" -replace "([0-9]+)\.([0-9]+)\.([0-9]+)","$dotNetVersion" + "$Env.BRANCH_NAME"
6+
$infoVersion = -join(("$gitSimpleVersion" -replace "([0-9]+)\.([0-9]+)\.([0-9]+)","$dotNetVersion"), "-", "$branchName")
77

88
$fileContent = @"
99
using System.Reflection;

0 commit comments

Comments
 (0)