Detect DEB and RPM package types
Instead of assuming DEB for Linux.
This commit is contained in:
parent
0cdc7cfc7e
commit
36d982f7f5
12
build.psm1
12
build.psm1
|
@ -493,7 +493,17 @@ Built upon .NET Core, it is also a C# REPL.
|
|||
|
||||
# Decide package output type
|
||||
if (-not $Type) {
|
||||
$Type = if ($IsLinux) { "deb" } elseif ($IsOSX) { "osxpkg" }
|
||||
$Type = if ($IsLinux) {
|
||||
if ($LinuxInfo.ID -match 'ubuntu') {
|
||||
"deb"
|
||||
} elseif ($LinuxInfo.ID -match 'centos') {
|
||||
"rpm"
|
||||
} else {
|
||||
throw "Building packages for $($LinuxInfo.PRETTY_NAME) is unsupported!"
|
||||
}
|
||||
} elseif ($IsOSX) {
|
||||
'osxpkg'
|
||||
}
|
||||
Write-Warning "-Type was not specified, continuing with $Type"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue