chore: release Erlang R16B03

- Provide a better install experience by cleaning up installed versions
   in the erl 5.10 series and their inclusion in PATH
This commit is contained in:
Iristyle
2014-01-03 13:42:05 -05:00
parent aedb2424aa
commit 8d4944e7fa
2 changed files with 46 additions and 7 deletions

View File

@@ -3,10 +3,10 @@
<metadata>
<id>Erlang16</id>
<title>Erlang OTP</title>
<version>16.01.4</version>
<version>16.03.4</version>
<authors>Joe Armstrong, Ericsson, Erlang Contributors</authors>
<owners>Ethan J Brown</owners>
<summary>Erlang R16B01 is a programming language used to build massively scalable soft real-time systems with requirements on high availability. Some of its uses are in telecoms, banking, e-commerce, computer telephony and instant messaging. Erlang's runtime system has built-in support for concurrency, distribution and fault tolerance.</summary>
<summary>Erlang R16B03 is a programming language used to build massively scalable soft real-time systems with requirements on high availability. Some of its uses are in telecoms, banking, e-commerce, computer telephony and instant messaging. Erlang's runtime system has built-in support for concurrency, distribution and fault tolerance.</summary>
<description>What is Erlang?
Erlang is a programming language used to build massively scalable soft real-time systems with requirements on high availability. Some of its uses are in telecoms, banking, e-commerce, computer telephony and instant messaging. Erlang's runtime system has built-in support for concurrency, distribution and fault tolerance.
@@ -16,7 +16,7 @@ Erlang quickstart
What is OTP?
OTP is set of Erlang libraries and design principles providing middle-ware to develop these systems. It includes its own distributed database, applications to interface towards other languages, debugging and release handling tools.</description>
<releaseNotes>http://www.erlang.org/download/otp_src_R16B01.readme</releaseNotes>
<releaseNotes>http://www.erlang.org/download/otp_src_R16B03.readme</releaseNotes>
<projectUrl>http://www.erlang.org/</projectUrl>
<tags>erlang concurrent programming language sdk otp</tags>
<licenseUrl>http://www.erlang.org/EPLICENSE</licenseUrl>

View File

@@ -1,11 +1,48 @@
$package = 'Erlang'
$version = 'R16B01'
$installFolder = 'erl5.10.2'
$version = 'R16B03'
$installFolder = 'erl5.10.4'
$releaseFolder = "$installFolder\releases\$version"
function Remove-PreviousVersions
{
$filter = 'erl5.10*'
$installs = (Get-ChildItem ${Env:\ProgramFiles(x86)} -Filter $filter) +
(Get-ChildItem $Env:ProgramFiles -Filter $filter)
$installs |
Get-ChildItem -Filter 'Uninstall.exe' |
Select -ExpandProperty FullName |
% {
$uninstallParams = @{
PackageName = $package;
FileType = 'exe';
SilentArgs = '/S';
File = $_;
}
try
{
# including additions to PATH
$binPath = (Join-Path (Split-Path $_) 'bin') -replace '\\', '\\'
$userPaths = [Environment]::GetEnvironmentVariable('Path', 'User') -split ';' |
? { ($_ -notmatch $binPath) -and (![String]::IsNullOrEmpty($_)) } |
Select-Object -Unique
[Environment]::SetEnvironmentVariable('Path', ($userPaths -join ';'), 'User')
Uninstall-ChocolateyPackage @uninstallParams
}
catch [Exception]
{
Write-Warning "Could not properly uninstall existing Erlang from $($uninstallParams.File):`n`n$_"
}
}
}
try {
$installedPath = (Join-Path "${Env:\ProgramFiles(x86)}" $installFolder),
$installedPath = (Join-Path ${Env:\ProgramFiles(x86)} $installFolder),
(Join-Path $Env:ProgramFiles "$installFolder\bin") |
? { Test-Path $_ } |
Select -First 1
@@ -17,6 +54,9 @@ try {
}
else
{
# first remove previous R16 releases if found
Remove-PreviousVersions
$params = @{
PackageName = $package;
FileType = 'exe';
@@ -41,4 +81,3 @@ try {
Write-ChocolateyFailure $package "$($_.Exception.Message)"
throw
}