Fix the Linux release build (#5660)
The Linux release build was broken because AppImage,tar,tar-arm in build.json is turned into a string of "AppImage,tar,tar-arm" by docker run. Now it's changed to use switch parameters.
This commit is contained in:
parent
eb254280fb
commit
4edfebd69f
|
@ -12,8 +12,9 @@ param (
|
||||||
[ValidateNotNullOrEmpty()]
|
[ValidateNotNullOrEmpty()]
|
||||||
[string]$ReleaseTag,
|
[string]$ReleaseTag,
|
||||||
|
|
||||||
[ValidateSet("AppImage", "tar", "tar-arm")]
|
[switch]$AppImage,
|
||||||
[string[]]$ExtraPackage
|
[switch]$TarX64,
|
||||||
|
[switch]$TarArm
|
||||||
)
|
)
|
||||||
|
|
||||||
$releaseTagParam = @{}
|
$releaseTagParam = @{}
|
||||||
|
@ -32,13 +33,10 @@ try {
|
||||||
Start-PSBuild -Crossgen -PSModuleRestore @releaseTagParam
|
Start-PSBuild -Crossgen -PSModuleRestore @releaseTagParam
|
||||||
|
|
||||||
Start-PSPackage @releaseTagParam
|
Start-PSPackage @releaseTagParam
|
||||||
switch ($ExtraPackage)
|
if ($AppImage) { Start-PSPackage -Type AppImage @releaseTagParam }
|
||||||
{
|
if ($TarX64) { Start-PSPackage -Type tar @releaseTagParam }
|
||||||
"AppImage" { Start-PSPackage -Type AppImage @releaseTagParam }
|
|
||||||
"tar" { Start-PSPackage -Type tar @releaseTagParam }
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($ExtraPackage -contains "tar-arm") {
|
if ($TarArm) {
|
||||||
## Build 'linux-arm' and create 'tar.gz' package for it.
|
## Build 'linux-arm' and create 'tar.gz' package for it.
|
||||||
## Note that 'linux-arm' can only be built on Ubuntu environment.
|
## Note that 'linux-arm' can only be built on Ubuntu environment.
|
||||||
Start-PSBuild -Runtime linux-arm -PSModuleRestore @releaseTagParam
|
Start-PSBuild -Runtime linux-arm -PSModuleRestore @releaseTagParam
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
{
|
{
|
||||||
"Name": "ubuntu.14.04",
|
"Name": "ubuntu.14.04",
|
||||||
"RepoDestinationPath": "/PowerShell",
|
"RepoDestinationPath": "/PowerShell",
|
||||||
"BuildCommand": "/PowerShellPackage.ps1 -location _RepoDestinationPath_ -destination _DockerVolume_ -ReleaseTag _ReleaseTag_ -ExtraPackage AppImage,tar,tar-arm",
|
"BuildCommand": "/PowerShellPackage.ps1 -location _RepoDestinationPath_ -destination _DockerVolume_ -ReleaseTag _ReleaseTag_ -AppImage -TarX64 -TarArm",
|
||||||
"BuildDockerOptions": [
|
"BuildDockerOptions": [
|
||||||
"--cap-add",
|
"--cap-add",
|
||||||
"SYS_ADMIN",
|
"SYS_ADMIN",
|
||||||
|
|
Loading…
Reference in a new issue