Skip to content

Commit 37a28bb

Browse files
committed
Update scripts/release_rebar.sh
1 parent 44eaa41 commit 37a28bb

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

scripts/release_rebar.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
# HEX_FASTLY_KEY=... \
77
# HEX_FASTLY_BUILDS_SERVICE_ID=... \
88
# release_rebar.sh
9-
#
10-
# Unless ELIXIR_PEM is set, nothing is uploaded. After running, can be locally tested:
9+
# Unless HEX_FASTLY_KEY is set, nothing is uploaded. After running, can be locally tested:
1110
#
1211
# $ (cd tmp && erl -S httpd)
1312
# $ HEX_BUILDS_URL=http://localhost:8000 mix local.rebar --force
@@ -27,25 +26,26 @@ function main {
2726
# UPDATE THIS FOR EVERY RELEASE
2827
build 3.22.0 25.3.2.20 1.18.3 noble-20250404
2928
build 3.22.0 26.2.5.11 1.18.3 noble-20250404
30-
3129
build 3.24.0 25.3.2.20 1.18.3 noble-20250404
3230
build 3.24.0 26.2.5.11 1.18.3 noble-20250404
3331
build 3.24.0 27.3.3 1.18.3 noble-20250404
3432
build 3.25.1 28.0.1 1.18.4 noble-20250714
3533

36-
if [ -n "${ELIXIR_PEM}" ]; then
37-
openssl dgst -sha512 -sign "${ELIXIR_PEM}" "${rebar_csv}" | openssl base64 > "${rebar_csv}.signed"
38-
cd $installs_dir
39-
for path in $(find . -type f | sort); do
40-
path="${path#./}"
34+
openssl dgst -sha512 -sign "${ELIXIR_PEM}" "${rebar_csv}" | openssl base64 > "${rebar_csv}.signed"
35+
cd $installs_dir
36+
for path in $(find . -type f | sort); do
37+
path="${path#./}"
38+
39+
if [ -n "${HEX_FASTLY_KEY-}" ]; then
4140
echo "uploading ${path}..."
4241
s3up "${path}" "${path}"
43-
done
42+
else
43+
echo "[skip] uploading ${path}..."
44+
fi
45+
done
4446

47+
if [ -n "${HEX_FASTLY_KEY-}" ]; then
4548
purge_key "${HEX_FASTLY_BUILDS_SERVICE_ID}" "installs"
46-
else
47-
echo "ELIXIR_PEM is empty, skipping"
48-
exit 1
4949
fi
5050
}
5151

0 commit comments

Comments
 (0)