Ensure that v is passed to the ldflags as part of windows binary creation (#6659)

This commit is contained in:
Paul Stack 2021-03-31 12:46:49 +01:00 committed by GitHub
parent d098f9181b
commit bf1a8d3387
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,7 @@ $PublishTargets = @($GitHash, $Version, $Branch)
function RunGoBuild($goPackage, $dir, $outputName) {
$binRoot = New-Item -ItemType Directory -Force -Path "$PublishDir\bin"
Push-Location $dir
go build -ldflags "-X github.com/pulumi/pulumi/pkg/v2/version.Version=$Version" -o "$binRoot\$outputName" $goPackage
go build -ldflags "-X github.com/pulumi/pulumi/pkg/v2/version.Version=v$Version" -o "$binRoot\$outputName" $goPackage
Pop-Location
}