Skip to content

Commit 52c509a

Browse files
committed
Salt after revision.
1 parent 437c7d2 commit 52c509a

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
@@ -3,10 +3,10 @@ $gitSimpleVersion = git describe --tags --abbrev=0
33
if ($gitSimpleVersion.Equals($gitVersion)) {
44
$buildSalt = 0
55
} else {
6-
$gitLatestCommit = git rev-parse HEAD
7-
$buildSalt = [System.Numerics.BigInteger]::Abs([System.Numerics.BigInteger]::Parse($gitLatestCommit, [System.Globalization.NumberStyles]::HexNumber) % 9988) + 1
6+
$gitLatestCommit = git rev-parse --short HEAD
7+
$buildSalt = [System.Numerics.BigInteger]::Abs([System.Numerics.BigInteger]::Parse($gitLatestCommit, [System.Globalization.NumberStyles]::HexNumber) % 16383) + 1
88
}
9-
$dotNetVersion = echo $gitSimpleVersion | Select-String -Pattern "([0-9]+)\.([0-9]+)\.([0-9]+)" | % {$_.Matches} | %{$_.Groups[1].Value+"."+$_.Groups[2].Value+".$buildSalt."+$_.Groups[3].Value}
9+
$dotNetVersion = echo $gitSimpleVersion | Select-String -Pattern "([0-9]+)\.([0-9]+)\.([0-9]+)" | % {$_.Matches} | %{$_.Groups[1].Value+"."+$_.Groups[2].Value+"."+$_.Groups[3].Value+".$buildSalt"}
1010

1111
$fileContent = @"
1212
using System.Reflection;

0 commit comments

Comments
 (0)