Fixing up the publishing mechanism for windows
@@ -10,9 +10,8 @@ $Version = $( & "$PSScriptRoot\get-version.cmd")
$Branch = $(if (Test-Path env:APPVEYOR_REPO_BRANCH) { $env:APPVEYOR_REPO_BRANCH } else { $(git rev-parse --abbrev-ref HEAD) })
$PublishTargets = @($GitHash, $Version, $Branch)
-function RunGoBuild($goPackage, $dir) {
+function RunGoBuild($goPackage, $dir, $outputName) {
$binRoot = New-Item -ItemType Directory -Force -Path "$PublishDir\bin"
- $outputName = Split-Path -Leaf $(go list -f "{{.Target}}" $goPackage)
Push-Location $dir
go build -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=$Version" -o "$binRoot\$outputName" $goPackage
Pop-Location
@@ -29,11 +28,11 @@ function CopyPackage($pathToModule, $moduleName) {
}
}
-RunGoBuild "github.com/pulumi/pulumi/pkg/cmd/pulumi" "pkg"
-RunGoBuild "github.com/pulumi/pulumi/sdk/nodejs/cmd/pulumi-language-nodejs" "sdk"
-RunGoBuild "github.com/pulumi/pulumi/sdk/python/cmd/pulumi-language-python" "sdk"
-RunGoBuild "github.com/pulumi/pulumi/sdk/dotnet/cmd/pulumi-language-dotnet" "sdk"
-RunGoBuild "github.com/pulumi/pulumi/sdk/go/pulumi-language-go" "sdk"
+RunGoBuild "github.com/pulumi/pulumi/pkg/cmd/pulumi" "pkg" "pulumi"
+RunGoBuild "github.com/pulumi/pulumi/sdk/nodejs/cmd/pulumi-language-nodejs" "sdk" "pulumi-language-nodejs"
+RunGoBuild "github.com/pulumi/pulumi/sdk/python/cmd/pulumi-language-python" "sdk" "pulumi-language-python"
+RunGoBuild "github.com/pulumi/pulumi/sdk/dotnet/cmd/pulumi-language-dotnet" "sdk" "pulumi-language-dotnet"
+RunGoBuild "github.com/pulumi/pulumi/sdk/go/pulumi-language-go" "sdk" "pulumi-language-go"
CopyPackage "$Root\sdk\nodejs\bin" "pulumi"
Copy-Item "$Root\sdk\nodejs\dist\pulumi-resource-pulumi-nodejs.cmd" "$PublishDir\bin"
