Versioning should work now

This commit is contained in:
Brant Martin
2019-03-03 15:21:57 -05:00
parent b555f46f56
commit 14ae58ca0c

View File

@@ -1,9 +1,9 @@
$buildSalt = $Env:BUILD_NUMBER $buildSalt = $Env.BUILD_NUMBER
$gitVersion = git describe --tags $branchName = $Env.BRANCH_NAME
$gitSimpleVersion = git describe --tags --abbrev=0 $gitSimpleVersion = git describe --tags --abbrev=0
$simpleVersionStandard = echo $gitSimpleVersion | Select-String -Pattern "([0-9]+)\.([0-9]+)\.([0-9]+)" | % {$_.Matches} | %{$_.Groups[1].Value+"."+$_.Groups[2].Value+"."+$_.Groups[3].Value} $simpleVersionStandard = echo $gitSimpleVersion | Select-String -Pattern "([0-9]+)\.([0-9]+)\.([0-9]+)" | % {$_.Matches} | %{$_.Groups[1].Value+"."+$_.Groups[2].Value+"."+$_.Groups[3].Value}
$dotNetVersion = "$simpleVersionStandard.$buildSalt" $dotNetVersion = "$simpleVersionStandard.$buildSalt"
$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")
$fileContent = @" $fileContent = @"
using System.Reflection; using System.Reflection;