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:
Dongbo Wang 2017-12-09 13:32:37 -08:00 committed by Travis Plunk
parent eb254280fb
commit 4edfebd69f
2 changed files with 13 additions and 15 deletions

View File

@ -12,8 +12,9 @@ param (
[ValidateNotNullOrEmpty()]
[string]$ReleaseTag,
[ValidateSet("AppImage", "tar", "tar-arm")]
[string[]]$ExtraPackage
[switch]$AppImage,
[switch]$TarX64,
[switch]$TarArm
)
$releaseTagParam = @{}
@ -32,13 +33,10 @@ try {
Start-PSBuild -Crossgen -PSModuleRestore @releaseTagParam
Start-PSPackage @releaseTagParam
switch ($ExtraPackage)
{
"AppImage" { Start-PSPackage -Type AppImage @releaseTagParam }
"tar" { Start-PSPackage -Type tar @releaseTagParam }
}
if ($AppImage) { Start-PSPackage -Type AppImage @releaseTagParam }
if ($TarX64) { Start-PSPackage -Type tar @releaseTagParam }
if ($ExtraPackage -contains "tar-arm") {
if ($TarArm) {
## Build 'linux-arm' and create 'tar.gz' package for it.
## Note that 'linux-arm' can only be built on Ubuntu environment.
Start-PSBuild -Runtime linux-arm -PSModuleRestore @releaseTagParam

View File

@ -9,7 +9,7 @@
"3968m"
],
"DockerFile": ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\DockerFile",
"AdditionalContextFiles" :[
"AdditionalContextFiles" :[
".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\PowerShellPackage.ps1",
".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\wix.psm1",
".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\dockerInstall.psm1"
@ -26,7 +26,7 @@
"3968m"
],
"DockerFile": ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\DockerFile",
"AdditionalContextFiles" :[
"AdditionalContextFiles" :[
".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\PowerShellPackage.ps1",
".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\wix.psm1",
".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\dockerInstall.psm1"
@ -43,7 +43,7 @@
"3968m"
],
"DockerFile": ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\DockerFile",
"AdditionalContextFiles" :[
"AdditionalContextFiles" :[
".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\PowerShellPackage.ps1",
".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\wix.psm1",
".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\dockerInstall.psm1"
@ -62,7 +62,7 @@
"3968m"
],
"DockerFile": ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\DockerFile",
"AdditionalContextFiles" :[
"AdditionalContextFiles" :[
".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\PowerShellPackage.ps1",
".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\wix.psm1",
".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\dockerInstall.psm1"
@ -81,7 +81,7 @@
"3968m"
],
"DockerFile": ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\DockerFile",
"AdditionalContextFiles" :[
"AdditionalContextFiles" :[
".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\PowerShellPackage.ps1",
".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\wix.psm1",
".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\dockerInstall.psm1"
@ -99,7 +99,7 @@
"3968m"
],
"DockerFile": ".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\DockerFile",
"AdditionalContextFiles" :[
"AdditionalContextFiles" :[
".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\PowerShellPackage.ps1",
".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\wix.psm1",
".\\tools\\releaseBuild\\Images\\microsoft_powershell_windowsservercore\\dockerInstall.psm1"
@ -113,7 +113,7 @@
{
"Name": "ubuntu.14.04",
"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": [
"--cap-add",
"SYS_ADMIN",