diff --git a/README.md b/README.md index b53867e515..b2316e655a 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/build.psm1 b/build.psm1 index 3b69e4f7e7..cb88fe4630 100644 --- a/build.psm1 +++ b/build.psm1 @@ -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 ", "--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 '["{}]')) } diff --git a/docs/installation/linux.md b/docs/installation/linux.md index 8701699dac..60cb31eb4c 100644 --- a/docs/installation/linux.md +++ b/docs/installation/linux.md @@ -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. diff --git a/tools/download.sh b/tools/download.sh index d51e38affe..ff5a1c37cc 100755 --- a/tools/download.sh +++ b/tools/download.sh @@ -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