|
7 | 7 | # HEX_FASTLY_BUILDS_SERVICE_ID=... \ |
8 | 8 | # release_hex.sh HEX_VERSION |
9 | 9 | # |
10 | | -# Unless ELIXIR_PEM is set, nothing is uploaded. After running, can be locally tested: |
| 10 | +# Pass --dry-run to build archives without uploading: |
| 11 | +# |
| 12 | +# $ release_hex.sh --dry-run HEX_VERSION |
| 13 | +# |
| 14 | +# After running, can be locally tested: |
11 | 15 | # |
12 | 16 | # $ (cd tmp && erl -S httpd) |
13 | 17 | # $ HEX_BUILDS_URL=http://localhost:8000 mix local.hex --force |
14 | 18 |
|
15 | 19 | set -e -u -o pipefail |
16 | 20 |
|
17 | 21 | function main { |
18 | | - hex_version=$1 |
| 22 | + dry_run=false |
| 23 | + local args=() |
| 24 | + for arg in "$@"; do |
| 25 | + if [ "$arg" = "--dry-run" ]; then |
| 26 | + dry_run=true |
| 27 | + else |
| 28 | + args+=("$arg") |
| 29 | + fi |
| 30 | + done |
| 31 | + |
| 32 | + hex_version=${args[0]} |
19 | 33 | installs_dir="$PWD/tmp/installs" |
20 | 34 | hex_csv="${installs_dir}/hex.csv" |
21 | 35 | hex_1x_csv="${installs_dir}/hex-1.x.csv" |
@@ -46,15 +60,22 @@ function main { |
46 | 60 | build ${hex_version} 27.3.3 1.17.3 1.17.0 noble-20250404 |
47 | 61 |
|
48 | 62 | # 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 |
| 63 | + build ${hex_version} 25.3.2.18 1.18.0 1.18.0 noble-20260210.1 # need to use exactly 1.18.0 |
| 64 | + build ${hex_version} 26.2.5.18 1.18.0 1.18.0 noble-20260210.1 # ditto |
| 65 | + build ${hex_version} 27.3.4.9 1.18.0 1.18.0 noble-20260210.1 # ditto |
| 66 | + |
| 67 | + # Elixir v1.19 |
| 68 | + build ${hex_version} 26.2.5.18 1.19.5 1.19.0 noble-20260210.1 |
| 69 | + build ${hex_version} 27.3.4.9 1.19.5 1.19.0 noble-20260210.1 |
| 70 | + build ${hex_version} 28.4.1 1.19.5 1.19.0 noble-20260210.1 |
52 | 71 |
|
53 | 72 | rm -rf _build |
54 | 73 | rm "${hex_csv}.bak" |
55 | 74 | rm "${hex_1x_csv}.bak" |
56 | 75 |
|
57 | | - if [ -n "${ELIXIR_PEM}" ]; then |
| 76 | + if [ "${dry_run}" = true ]; then |
| 77 | + echo "Dry run complete, archives in ${installs_dir}" |
| 78 | + elif [ -n "${ELIXIR_PEM}" ]; then |
58 | 79 | openssl dgst -sha512 -sign "${ELIXIR_PEM}" "${hex_csv}" | openssl base64 > "${hex_csv}.signed" |
59 | 80 | openssl dgst -sha512 -sign "${ELIXIR_PEM}" "${hex_1x_csv}" | openssl base64 > "${hex_1x_csv}.signed" |
60 | 81 |
|
|
0 commit comments