You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2023/11/18 13:01:04 UTC

(couchdb-glazier) 01/01: Draft to download and install Erlang binaries

This is an automated email from the ASF dual-hosted git repository.

ronny pushed a commit to branch install_erlangs
in repository https://gitbox.apache.org/repos/asf/couchdb-glazier.git

commit 5842af3ba57416fe4fd389fe07ab99337aef73b0
Author: Ronny Berndt <ro...@apache.org>
AuthorDate: Sat Nov 18 14:00:30 2023 +0100

    Draft to download and install Erlang binaries
---
 jenkins/install_erlangs.ps1 | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/jenkins/install_erlangs.ps1 b/jenkins/install_erlangs.ps1
new file mode 100644
index 0000000..c43a8a1
--- /dev/null
+++ b/jenkins/install_erlangs.ps1
@@ -0,0 +1,35 @@
+$ERLANG_INSTALL_VERSIONS = @('23.3.4.18','24.3.4.7','25.2')
+$ERLANG_INSTALL_PATH = '/Users/big-r/Downloads/' #'C:\\tools\\'
+
+function Download-Erlang {
+    param (
+        [ValidateNotNullOrEmpty()]
+        [string[]]$ErlangVersion
+    )
+    $url = "https://github.com/erlang/otp/releases/download/OTP-${ErlangVersion}/otp_win64_${ErlangVersion}.exe"
+    $WebClient = New-Object net.webclient
+    $WebClient.Downloadfile($url, "$PSScriptRoot/otp_win64_${ErlangVersion}.exe")
+}
+
+function Install-Erlang {
+    param (
+        [ValidateNotNullOrEmpty()]
+        [string[]]$ErlangVersion
+    )
+    $FilePath = Join-Path -Path $PSScriptRoot -ChildPath "otp_win64_${ErlangVersion}.exe"
+    $InstallPath = Join-Path -Path $ERLANG_INSTALL_PATH -ChildPath "erl-${ErlangVersion}"
+    $V = New-Object System.Version($ErlangVersion)
+    Write-Host $FilePath
+    Write-Host $InstallPath
+    #Start-Process -Wait -Filepath $FilePath -ArgumentList "/S /D=${ERLANG_INSTALL_PATH}"
+}
+
+# https://github.com/erlang/otp/releases/download/OTP-25.2/otp_win64_25.2.exe
+# https://github.com/erlang/otp/releases/download/OTP-24.3.4.7/otp_win64_24.3.4.7.exe
+# https://github.com/erlang/otp/releases/download/OTP-23.3.4.18/otp_win64_23.3.4.18.exe
+
+foreach ($version in $ERLANG_INSTALL_VERSIONS) {
+    Write-Host "$version"
+    #Download-Erlang -ErlangVersion $version
+    Install-Erlang -ErlangVersion $version
+}