mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-24 02:04:07 +08:00
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()]
|
||||
[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
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user