Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 20 additions & 19 deletions build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
)
Expand Down Expand Up @@ -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) {
Expand Down
21 changes: 20 additions & 1 deletion tools/packaging/packaging.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }
}
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -1397,6 +1412,9 @@ function New-UnifiedNugetPackage
[Parameter(Mandatory = $true)]
[string] $LinuxArm32BinPath,

[Parameter(Mandatory = $true)]
[string] $LinuxMuslPath,

[Parameter(Mandatory = $true)]
[string] $LinuxBinPath,

Expand Down Expand Up @@ -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
}
Expand Down