Add validation and dependencies for Ubuntu 20.04 distribution to packaging script (#13993)

This commit is contained in:
Anam Navied 2020-11-05 21:14:12 -05:00 committed by GitHub
parent 40549c3585
commit a16f3eb204
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -156,6 +156,7 @@ function Get-EnvironmentInformation
$environment += @{'IsUbuntu' = $LinuxInfo.ID -match 'ubuntu' -or $LinuxID -match 'Ubuntu'}
$environment += @{'IsUbuntu16' = $environment.IsUbuntu -and $LinuxInfo.VERSION_ID -match '16.04'}
$environment += @{'IsUbuntu18' = $environment.IsUbuntu -and $LinuxInfo.VERSION_ID -match '18.04'}
$environment += @{'IsUbuntu20' = $environment.IsUbuntu -and $LinuxInfo.VERSION_ID -match '20.04'}
$environment += @{'IsCentOS' = $LinuxInfo.ID -match 'centos' -and $LinuxInfo.VERSION_ID -match '7'}
$environment += @{'IsFedora' = $LinuxInfo.ID -match 'fedora' -and $LinuxInfo.VERSION_ID -ge 24}
$environment += @{'IsOpenSUSE' = $LinuxInfo.ID -match 'opensuse'}

View file

@ -6,7 +6,7 @@ $RepoRoot = (Resolve-Path -Path "$PSScriptRoot/../..").Path
$packagingStrings = Import-PowerShellDataFile "$PSScriptRoot\packaging.strings.psd1"
Import-Module "$PSScriptRoot\..\Xml" -ErrorAction Stop -Force
$DebianDistributions = @("ubuntu.16.04", "ubuntu.18.04", "debian.9", "debian.10", "debian.11")
$DebianDistributions = @("ubuntu.16.04", "ubuntu.18.04", "ubuntu.20.04", "debian.9", "debian.10", "debian.11")
$RedhatDistributions = @("rhel.7","centos.8")
$script:netCoreRuntime = 'net5.0'
$script:iconFileName = "Powershell_black_64.png"
@ -780,6 +780,8 @@ function New-UnixPackage {
$DebDistro = "ubuntu.16.04"
} elseif ($Environment.IsUbuntu18) {
$DebDistro = "ubuntu.18.04"
} elseif ($Environment.IsUbuntu20) {
$DebDistro = "ubuntu.20.04"
} elseif ($Environment.IsDebian9) {
$DebDistro = "debian.9"
} else {
@ -1274,6 +1276,7 @@ function Get-PackageDependencies
switch -regex ($Distribution) {
"ubuntu\.16\.04" { $Dependencies += @("libssl1.0.0", "libicu55") }
"ubuntu\.18\.04" { $Dependencies += @("libssl1.0.0", "libicu60") }
"ubuntu\.20\.04" { $Dependencies += @("libssl1.1", "libicu66") }
"debian\.9" { $Dependencies += @("libssl1.0.2", "libicu57") }
"debian\.(10|11)" { $Dependencies += @("libssl1.1", "libicu63") }
default { throw "Debian distro '$Distribution' is not supported." }