Fix naming of Unix packages

- .NET Core RID suffixes removed
- `el7.centos` suffix added to RPM
- `1ubuntu1.14.04.1` iteration used for DEB packages

`~` cannot be used after `ubuntu1` because GitHub release renames it to
a `.`; additionally, no packages lack the final suffix `.1`. While my
machine is `.5` I could find no packages that went past `.3`, so let's
use this to indicate that it works for `14.04.1` and forward.

We are *not* recreating the alpha.9 packages, but will we rename them
accordingly. This means that the filenames will be "correct" but the
meta-data will be out-of-date.
This commit is contained in:
Andrew Schwartzmeyer committed 2016-08-16 16:07:54 -07:00
1 parent bd31e2ab5c
commit a9e809c18a
4 files changed
+29 -25

No files matched your search

+3 -3
View File
@@ -29,9 +29,9 @@ You can download and install a PowerShell package for any of the following platf
[rl-windows10]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/PowerShell_6.0.0.9-alpha.9-win10-x64.msi
[rl-windows81]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/PowerShell_6.0.0.9-alpha.9-win81-x64.msi
[rl-ubuntu16]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell_6.0.0-alpha.9-1_amd64-ubuntu.16.04-x64.deb
[rl-ubuntu14]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell_6.0.0-alpha.9-1_amd64-ubuntu.14.04-x64.deb
[rl-centos]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell-6.0.0_alpha.9-1.x86_64-centos.7-x64.rpm
[rl-ubuntu16]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb
[rl-ubuntu14]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell_6.0.0-alpha.9-1ubuntu1.14.04.1_amd64.deb
[rl-centos]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell-6.0.0_alpha.9-1.el7.centos.x86_64.rpm
[rl-osx]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell-6.0.0-alpha.9-osx.10.11-x64.pkg
[installation]: docs/installation
+16 -12
View File
@@ -923,7 +923,8 @@ function New-UnixPackage {
[string]$Version,
# Package iteration version (rarely changed)
[int]$Iteration = 1
# This is a string because strings are appended to it
[string]$Iteration = "1"
)
# Validate platform
@@ -1059,11 +1060,24 @@ It consists of a cross-platform command-line shell and associated scripting lang
"rpm" { "libicu" }
}
# iteration is "debian_revision"
# usage of this to differentiate distributions is allowed by non-standard
if ($IsUbuntu14) {
$Iteration += "ubuntu1.14.04.1"
} elseif ($IsUbuntu16) {
$Iteration += "ubuntu1.16.04.1"
}
# We currently only support CentOS 7
# https://fedoraproject.org/wiki/Packaging:DistTag
$rpm_dist = "el7.centos"
$Arguments = @(
"--force", "--verbose",
"--name", $Name,
"--version", $Version,
"--iteration", $Iteration,
"--rpm-dist", $rpm_dist,
"--maintainer", "PowerShell Team <PowerShellTeam@hotmail.com>",
"--vendor", "Microsoft Corporation",
"--url", "https://microsoft.com/powershell",
@@ -1094,17 +1108,7 @@ It consists of a cross-platform command-line shell and associated scripting lang
}
# Magic to get path output
$Package = Get-Item (Join-Path $PSScriptRoot (($Output[-1] -split ":path=>")[-1] -replace '["{}]'))
# Add runtime-identifier to package name.
# This information cannot be part of the package,
# but without a repository to host these,
# we need to differentiate distributions by the package's filename.
$PackageWithRuntime = "$($Package.BaseName)-$((New-PSOptions).Runtime)$($Package.Extension)"
Move-Item -Force $Package $PackageWithRuntime
return $PackageWithRuntime
return Get-Item (Join-Path $PSScriptRoot (($Output[-1] -split ":path=>")[-1] -replace '["{}]'))
}
+6 -6
View File
@@ -16,14 +16,14 @@ Ubuntu 14.04
============
Using [Ubuntu 14.04][], download the Debian package
`powershell_6.0.0-alpha.9-1_amd64-ubuntu.14.04-x64.deb`
`powershell_6.0.0-alpha.9-1ubuntu1.14.04.1_amd64.deb`
from the [releases][] page onto the Ubuntu machine.
Then execute the following in the terminal:
```sh
sudo apt-get install libunwind8 libicu52
sudo dpkg -i powershell_6.0.0-alpha.9-1_amd64-ubuntu.14.04-x64.deb
sudo dpkg -i powershell_6.0.0-alpha.9-1ubuntu1.14.04.1_amd64.deb
```
[Ubuntu 14.04]: http://releases.ubuntu.com/14.04/
@@ -32,7 +32,7 @@ Ubuntu 16.04
============
Using [Ubuntu 16.04][], download the Debian package
`powershell_6.0.0-alpha.9-1_amd64-ubuntu.16.04-x64.deb`
`powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb`
from the [releases][] page onto the Ubuntu machine.
Then execute the following in the terminal:
@@ -41,7 +41,7 @@ Then execute the following in the terminal:
```sh
sudo apt-get install libunwind8 libicu55
sudo dpkg -i powershell_6.0.0-alpha.9-1_amd64-ubuntu.16.04-x64.deb
sudo dpkg -i powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb
```
[Ubuntu 16.04]: http://releases.ubuntu.com/16.04/
@@ -51,13 +51,13 @@ CentOS 7
========
Using [CentOS 7][], download the RPM package
`powershell-6.0.0_alpha.9-1.x86_64-centos.7-x64.rpm`
`powershell-6.0.0_alpha.9-1.el7.centos.x86_64.rpm`
from the [releases][] page onto the CentOS machine.
Then execute the following in the terminal:
```sh
sudo yum install powershell-6.0.0_alpha.9-1.x86_64-centos.7-x64.rpm
sudo yum install powershell-6.0.0_alpha.9-1.el7.centos.x86_64.rpm
```
> This package should work on Red Hat Enterprise Linux 7 too.
+4 -4
View File
@@ -28,10 +28,10 @@ case "$OSTYPE" in
sudo apt-get install -y curl wget
case "$VERSION_ID" in
14.04)
version=ubuntu.14.04-x64.deb
version=ubuntu1.14.04.1_amd64.deb
;;
16.04)
version=ubuntu.16.04-x64.deb
version=ubuntu1.16.04.1_amd64.deb
;;
*)
exit 2 >&2 "Ubuntu $VERSION_ID is not supported!"
@@ -71,10 +71,10 @@ case "$OSTYPE" in
ubuntu)
case "$VERSION_ID" in
14.04)
$icupackage=libicu52
icupackage=libicu52
;;
16.04)
$icupackage=libicu55
icupackage=libicu55
;;
esac
sudo apt-get install -y libunwind8 $icupackage