update build and packaging modules for Alpine (#7149)
This commit is contained in:
parent
5e8b23e127
commit
167b51c4d6
39
build.psm1
39
build.psm1
|
@ -419,13 +419,14 @@ function Start-PSBuild {
|
|||
# These runtimes must match those in project.json
|
||||
# We do not use ValidateScript since we want tab completion
|
||||
# If this parameter is not provided it will get determined automatically.
|
||||
[ValidateSet("win7-x64",
|
||||
"win7-x86",
|
||||
"osx-x64",
|
||||
[ValidateSet("linux-arm",
|
||||
"linux-musl-x64",
|
||||
"linux-x64",
|
||||
"linux-arm",
|
||||
"osx-x64",
|
||||
"win-arm",
|
||||
"win-arm64")]
|
||||
"win-arm64",
|
||||
"win7-x64",
|
||||
"win7-x86")]
|
||||
[string]$Runtime,
|
||||
|
||||
[ValidateSet('Debug', 'Release', 'CodeCoverage', '')] # We might need "Checked" as well
|
||||
|
@ -737,13 +738,14 @@ function New-PSOptions {
|
|||
# These are duplicated from Start-PSBuild
|
||||
# We do not use ValidateScript since we want tab completion
|
||||
[ValidateSet("",
|
||||
"win7-x86",
|
||||
"win7-x64",
|
||||
"osx-x64",
|
||||
"linux-x64",
|
||||
"linux-arm",
|
||||
"linux-musl-x64",
|
||||
"linux-x64",
|
||||
"osx-x64",
|
||||
"win-arm",
|
||||
"win-arm64")]
|
||||
"win-arm64",
|
||||
"win7-x64",
|
||||
"win7-x86")]
|
||||
[string]$Runtime,
|
||||
|
||||
[switch]$CrossGen,
|
||||
|
@ -2160,13 +2162,14 @@ function Start-CrossGen {
|
|||
$PublishPath,
|
||||
|
||||
[Parameter(Mandatory=$true)]
|
||||
[ValidateSet("win7-x86",
|
||||
"win7-x64",
|
||||
"osx-x64",
|
||||
[ValidateSet("linux-arm",
|
||||
"linux-musl-x64",
|
||||
"linux-x64",
|
||||
"linux-arm",
|
||||
"osx-x64",
|
||||
"win-arm",
|
||||
"win-arm64")]
|
||||
"win-arm64",
|
||||
"win7-x64",
|
||||
"win7-x86")]
|
||||
[string]
|
||||
$Runtime
|
||||
)
|
||||
|
@ -2227,10 +2230,8 @@ function Start-CrossGen {
|
|||
}
|
||||
} elseif ($Runtime -eq "linux-arm") {
|
||||
throw "crossgen is not available for 'linux-arm'"
|
||||
} elseif ($Environment.IsLinux) {
|
||||
"linux-x64"
|
||||
} elseif ($Environment.IsMacOS) {
|
||||
"osx-x64"
|
||||
} else {
|
||||
$Runtime
|
||||
}
|
||||
|
||||
if (-not $crossGenRuntime) {
|
||||
|
|
|
@ -22,7 +22,7 @@ function Start-PSPackage {
|
|||
[string]$Name = "powershell",
|
||||
|
||||
# Ubuntu, CentOS, Fedora, macOS, and Windows packages are supported
|
||||
[ValidateSet("deb", "osxpkg", "rpm", "msi", "zip", "AppImage", "nupkg", "tar", "tar-arm")]
|
||||
[ValidateSet("deb", "osxpkg", "rpm", "msi", "zip", "AppImage", "nupkg", "tar", "tar-arm", 'tar-musl')]
|
||||
[string[]]$Type,
|
||||
|
||||
# Generate windows downlevel package
|
||||
|
@ -64,6 +64,8 @@ function Start-PSPackage {
|
|||
$WindowsRuntime, "Release"
|
||||
} elseif ($Type -eq "tar-arm") {
|
||||
New-PSOptions -Configuration "Release" -Runtime "Linux-ARM" -WarningAction SilentlyContinue | ForEach-Object { $_.Runtime, $_.Configuration }
|
||||
} elseif ($Type -eq "tar-musl") {
|
||||
New-PSOptions -Configuration "Release" -Runtime "Linux-musl-x64" -WarningAction SilentlyContinue | ForEach-Object { $_.Runtime, $_.Configuration }
|
||||
} else {
|
||||
New-PSOptions -Configuration "Release" -WarningAction SilentlyContinue | ForEach-Object { $_.Runtime, $_.Configuration }
|
||||
}
|
||||
|
@ -316,6 +318,19 @@ function Start-PSPackage {
|
|||
New-TarballPackage @Arguments
|
||||
}
|
||||
}
|
||||
"tar-musl" {
|
||||
$Arguments = @{
|
||||
PackageSourcePath = $Source
|
||||
Name = $Name
|
||||
Version = $Version
|
||||
Force = $Force
|
||||
Architecture = "musl-x64"
|
||||
}
|
||||
|
||||
if ($PSCmdlet.ShouldProcess("Create tar.gz Package")) {
|
||||
New-TarballPackage @Arguments
|
||||
}
|
||||
}
|
||||
'deb' {
|
||||
$Arguments = @{
|
||||
Type = 'deb'
|
||||
|
@ -1397,6 +1412,9 @@ function New-UnifiedNugetPackage
|
|||
[Parameter(Mandatory = $true)]
|
||||
[string] $LinuxArm32BinPath,
|
||||
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string] $LinuxMuslPath,
|
||||
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string] $LinuxBinPath,
|
||||
|
||||
|
@ -1462,6 +1480,7 @@ function New-UnifiedNugetPackage
|
|||
if ($linuxExceptionList -notcontains $file )
|
||||
{
|
||||
CreateNugetPlatformFolder -Platform 'linux-arm' -PackageRuntimesFolder $packageRuntimesFolderPath -PlatformBinPath $linuxArm32BinPath
|
||||
CreateNugetPlatformFolder -Platform 'linux-musl-x64' -PackageRuntimesFolder $packageRuntimesFolderPath -PlatformBinPath $linuxMuslBinPath
|
||||
CreateNugetPlatformFolder -Platform 'linux-x64' -PackageRuntimesFolder $packageRuntimesFolderPath -PlatformBinPath $linuxBinPath
|
||||
CreateNugetPlatformFolder -Platform 'osx' -PackageRuntimesFolder $packageRuntimesFolderPath -PlatformBinPath $osxBinPath
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue