33# Usage:
44#
55# $ ELIXIR_PEM=/path/to/elixir.pem \
6- # HEX_FASTLY_KEY=... \
7- # HEX_FASTLY_BUILDS_SERVICE_ID=... \
86# release_hex.sh HEX_VERSION
97#
108# Unless ELIXIR_PEM is set, nothing is uploaded. After running, can be locally tested:
1412
1513set -e -u -o pipefail
1614
15+ HEX_FASTLY_BUILDS_SERVICE_ID=" GbeDoh1ZO7MEM3zut4K2fR"
16+
1717function main {
1818 hex_version=$1
1919 installs_dir=" $PWD /tmp/installs"
@@ -46,9 +46,14 @@ function main {
4646 build ${hex_version} 27.3.3 1.17.3 1.17.0 noble-20250404
4747
4848 # Elixir v1.18
49- build ${hex_version} 25.3.2.20 1.18.0 1.18.0 noble-20250404 # need to use exactly 1.18.0 and that requires older otp & ubuntu
50- build ${hex_version} 26.2.5.11 1.18.0 1.18.0 noble-20250404 # ditto
51- build ${hex_version} 27.3.3 1.18.0 1.18.0 noble-20250404 # ditto
49+ build ${hex_version} 25.3.2.20 1.18.0 1.18.0 noble-20251001 # need to use exactly 1.18.0 and that requires older otp & ubuntu
50+ build ${hex_version} 26.2.5.11 1.18.0 1.18.0 noble-20251001 # ditto
51+ build ${hex_version} 27.3.3 1.18.0 1.18.0 noble-20251001 # ditto
52+
53+ # Elixir v1.19
54+ build ${hex_version} 26.2.5.15 1.19.1 1.19.0 noble-20251001
55+ build ${hex_version} 27.3.4.3 1.19.1 1.19.0 noble-20251001
56+ build ${hex_version} 28.1.1 1.19.1 1.19.0 noble-20251001
5257
5358 rm -rf _build
5459 rm " ${hex_csv} .bak"
@@ -65,9 +70,7 @@ function main {
6570 s3up " ${path} " " ${path} "
6671 done
6772
68- purge_key " ${HEX_FASTLY_BUILDS_SERVICE_ID} " " installs"
69- sleep 5
70- purge_key " ${HEX_FASTLY_BUILDS_SERVICE_ID} " " installs"
73+ purge_key " installs"
7174 else
7275 echo " ELIXIR_PEM is empty, skipping"
7376 exit 1
@@ -141,16 +144,11 @@ function s3down {
141144 aws s3 cp " s3://s3.hex.pm/installs/${1} " " ${2} "
142145}
143146
144- # $1 = service
145- # $2 = key
147+ # $1 = key
146148function purge_key() {
147- curl \
148- --fail \
149- -X POST \
150- -H " Fastly-Key: ${HEX_FASTLY_KEY} " \
151- -H " Accept: application/json" \
152- -H " Content-Length: 0" \
153- " https://api.fastly.com/service/$1 /purge/$2 "
149+ fastly purge --service-id=${HEX_FASTLY_BUILDS_SERVICE_ID} --key=${1}
150+ sleep 5
151+ fastly purge --service-id=${HEX_FASTLY_BUILDS_SERVICE_ID} --key=${1}
154152}
155153
156154main $*
0 commit comments