Merge pull request #5971 from boumenot/pr-build-ps1
Better override support for PS build script
This commit is contained in:
commit
b8af3a6e0c
|
@ -53,11 +53,19 @@ if ($LastExitCode -eq 0) {
|
||||||
if (Test-Path env:PACKER_DEV) {
|
if (Test-Path env:PACKER_DEV) {
|
||||||
$XC_OS=$(go.exe env GOOS)
|
$XC_OS=$(go.exe env GOOS)
|
||||||
$XC_ARCH=$(go.exe env GOARCH)
|
$XC_ARCH=$(go.exe env GOARCH)
|
||||||
}
|
} else {
|
||||||
elseif (-not (Test-Path env:XC_ARCH)) {
|
if (Test-Path env:XC_ARCH) {
|
||||||
|
$XC_ARCH = $(Get-Content env:XC_ARCH)
|
||||||
|
} else {
|
||||||
$XC_ARCH="386 amd64 arm arm64 ppc64le"
|
$XC_ARCH="386 amd64 arm arm64 ppc64le"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Test-Path env:XC_OS) {
|
||||||
|
$XC_OS = $(Get-Content env:XC_OS)
|
||||||
|
} else {
|
||||||
$XC_OS = "linux darwin windows freebsd openbsd solaris"
|
$XC_OS = "linux darwin windows freebsd openbsd solaris"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Delete the old dir
|
# Delete the old dir
|
||||||
echo "==> Removing old directory..."
|
echo "==> Removing old directory..."
|
||||||
|
|
Loading…
Reference in New Issue