File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,10 +3,10 @@ $gitSimpleVersion = git describe --tags --abbrev=0
33if ($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 = @"
1212using System.Reflection;
You can’t perform that action at this time.
0 commit comments