New option to work with one or more hex.pm mirrors (#197)

* New option to work with one or more hex.pm mirrors

Add a new option called `hexpm-mirrors` for one or more hex.pm mirrors.
Default list is `builds.hex.pm`, so behavior is unaffected unless option is
used.

Signed-off-by: Paul Guyot <pguyot@kallisys.net>

* Implement suggested rewording changes from @paulo-ferraz-oliveira

Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
Signed-off-by: Paul Guyot <pguyot@kallisys.net>

---------

Signed-off-by: Paul Guyot <pguyot@kallisys.net>
Co-authored-by: Paulo F. Oliveira <paulo.ferraz.oliveira@gmail.com>
This commit is contained in:
Paul Guyot
2023-05-04 08:27:05 +02:00
committed by GitHub
parent 9641cb96c1
commit cf692c3264
13 changed files with 362 additions and 99 deletions
+2 -1
View File
@@ -6,11 +6,12 @@ cd "${RUNNER_TEMP}"
OS=${1}
VSN=${2}
HEX_MIRROR=${3}
FILE_INPUT="${VSN}.tar.gz"
FILE_OUTPUT=otp.tar.gz
DIR_FOR_BIN=.setup-beam/otp
wget -q -O "${FILE_OUTPUT}" "https://builds.hex.pm/builds/otp/${OS}/${FILE_INPUT}"
wget -q -O "${FILE_OUTPUT}" "${HEX_MIRROR}/builds/otp/${OS}/${FILE_INPUT}"
mkdir -p "${DIR_FOR_BIN}"
tar zxf "${FILE_OUTPUT}" -C "${DIR_FOR_BIN}" --strip-components=1
"${DIR_FOR_BIN}/Install" -minimal "$(pwd)/${DIR_FOR_BIN}"