Skip to content

Commit

Permalink
Change packaging to support Ubuntu 17.10 and 18.04 (PowerShell#6769)
Browse files Browse the repository at this point in the history
Ubuntu 17.04 is EOL, so we need to update our packaging for Ubuntu 17.10. This updates the package script and build.psm1 to use 17.10 rather than 17.04.
  • Loading branch information
rjmholt authored and TravisEz13 committed May 7, 2018
1 parent 0b414f6 commit d96a321
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ function Get-EnvironmentInformation
$environment += @{'IsUbuntu' = $LinuxInfo.ID -match 'ubuntu'}
$environment += @{'IsUbuntu14' = $Environment.IsUbuntu -and $LinuxInfo.VERSION_ID -match '14.04'}
$environment += @{'IsUbuntu16' = $Environment.IsUbuntu -and $LinuxInfo.VERSION_ID -match '16.04'}
$environment += @{'IsUbuntu17' = $Environment.IsUbuntu -and $LinuxInfo.VERSION_ID -match '17.04'}
$environment += @{'IsUbuntu17' = $Environment.IsUbuntu -and $LinuxInfo.VERSION_ID -match '17.10'}
$environment += @{'IsUbuntu18' = $Environment.IsUbuntu -and $LinuxInfo.VERSION_ID -match '18.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'}
Expand Down
9 changes: 6 additions & 3 deletions tools/packaging/packaging.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
$Environment = Get-EnvironmentInformation

$packagingStrings = Import-PowerShellDataFile "$PSScriptRoot\packaging.strings.psd1"
$DebianDistributions = @("ubuntu.14.04", "ubuntu.16.04", "ubuntu.17.04", "debian.8", "debian.9")
$DebianDistributions = @("ubuntu.14.04", "ubuntu.16.04", "ubuntu.17.10", "ubuntu.18.04", "debian.8", "debian.9")

function Start-PSPackage {
[CmdletBinding(DefaultParameterSetName='Version',SupportsShouldProcess=$true)]
Expand Down Expand Up @@ -573,7 +573,9 @@ function New-UnixPackage {
} elseif ($Environment.IsUbuntu16) {
$DebDistro = "ubuntu.16.04"
} elseif ($Environment.IsUbuntu17) {
$DebDistro = "ubuntu.17.04"
$DebDistro = "ubuntu.17.10"
} elseif ($Environment.IsUbuntu18) {
$DebDistro = "ubuntu.18.04"
} elseif ($Environment.IsDebian8) {
$DebDistro = "debian.8"
} elseif ($Environment.IsDebian9) {
Expand Down Expand Up @@ -992,7 +994,8 @@ function Get-PackageDependencies
switch ($Distribution) {
"ubuntu.14.04" { $Dependencies += @("libssl1.0.0", "libicu52") }
"ubuntu.16.04" { $Dependencies += @("libssl1.0.0", "libicu55") }
"ubuntu.17.04" { $Dependencies += @("libssl1.0.0", "libicu57") }
"ubuntu.17.10" { $Dependencies += @("libssl1.0.0", "libicu57") }
"ubuntu.18.04" { $Dependencies += @("libssl1.0.0", "libicu60") }
"debian.8" { $Dependencies += @("libssl1.0.0", "libicu52") }
"debian.9" { $Dependencies += @("libssl1.0.2", "libicu57") }
default { throw "Debian distro '$Distribution' is not supported." }
Expand Down

0 comments on commit d96a321

Please sign in to comment.