Skip to content

Commit

Permalink
Use git short sha instead of timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
heqianwang committed Apr 3, 2024
1 parent 753a875 commit bbea538
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ Process {
Exec { & dotnet tool restore }

# Let GitVersion compute the NuGet package version
$uniqueId = Get-Date -Format "yyyyMMddHHmmss"
$shortSHA = Exec { & git rev-parse --short HEAD }
$gitVersion = Exec { & dotnet dotnet-gitversion /output json /showvariable SemVer }
$version = "$gitVersion.$uniqueId"
$version = "$gitVersion.$shortSHA"

# Pack using NuGet.exe
Exec { & nuget pack Workleap.DotNet.CodingStandards.nuspec -OutputDirectory $outputDir -Version $version -ForceEnglishOutput }
Expand Down

0 comments on commit bbea538

Please sign in to comment.