steid

@jamesgill /

build: one command builds every target

`release.sh --all` builds each target a published release carries, currently
x86_64 and aarch64 Linux. It re-runs the script per target rather than looping
inline, so a single failure aborts the whole release instead of leaving a
half-published set where one architecture has today's build and another has last
week's — the failure mode that matters when several artefacts share a version
number.

The target list sits next to a note that it must agree with install.sh's
`uname -m` detection: adding a target here without teaching the installer about
it produces a tarball nobody ever downloads.

Both artefacts verified by booting them on Debian 11 (glibc 2.31, the oldest
supported), x86_64 and aarch64: health check, the apex redirect to the owner's
profile, and the security headers all present.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JZwc7URWKVhkAuRTWiDmjA
JamesPatrickGill authored 1 day agoparent8ed4e5aBrowse filesa2c1dd1f14c1b747f29d795685de2ec0aa0522a4

1 file changed+23 −1

release.sh+23 −1View file
@@ -29,7 +29,8 @@
2929 #
3030 # Usage:
3131 # ./release.sh # default target, via Docker
32# ./release.sh --target aarch64-unknown-linux-musl
32+# ./release.sh --target aarch64-unknown-linux-gnu
33+# ./release.sh --all # every target a published release carries
3334 # ./release.sh --native # host target, local toolchain
3435 # ./release.sh --target x86_64-unknown-linux-gnu --version 0.1.0
3536 #
@@ -62,6 +63,13 @@ TOPCOAT_CLI_VERSION="${STEID_TOPCOAT_CLI_VERSION:-0.5.0}"
6263 VERSION=""
6364 OUT_DIR="dist"
6465 NATIVE=0
66+ALL=0
67+
68+# Every target a published release carries. `install.sh` picks between them from
69+# `uname -m`, so this list and its architecture detection have to agree: adding a
70+# target here without teaching the installer about it produces a tarball nobody
71+# ever downloads.
72+ALL_TARGETS="x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu"
6573
6674 usage() {
6775 sed -n '2,32p' "$0" | sed 's/^#\{1,2\} \{0,1\}//'
@@ -74,6 +82,7 @@ while [ $# -gt 0 ]; do
7482 --version) VERSION="${2:?--version needs a value}"; shift 2 ;;
7583 --out) OUT_DIR="${2:?--out needs a directory}"; shift 2 ;;
7684 --native) NATIVE=1; shift ;;
85+ --all) ALL=1; shift ;;
7786 -h|--help) usage 0 ;;
7887 *) echo "release.sh: unknown argument: $1" >&2; usage 1 ;;
7988 esac
@@ -82,6 +91,19 @@ done
8291 REPO_ROOT="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)"
8392 cd "$REPO_ROOT"
8493
94+# --all re-runs this script once per target rather than looping inline, so a single
95+# failure aborts the whole release instead of leaving a half-published set where some
96+# architectures have today's build and others have last week's.
97+if [ "$ALL" = 1 ]; then
98+ for t in $ALL_TARGETS; do
99+ "$0" --target "$t" ${VERSION:+--version "$VERSION"} --out "$OUT_DIR" || exit 1
100+ done
101+ echo
102+ echo "release.sh: built every target"
103+ find "$OUT_DIR" -maxdepth 1 -name '*.tar.gz' -exec echo ' {}' \;
104+ exit 0
105+fi
106+
85107 # The version is the crate version unless overridden. Read with grep rather than
86108 # a TOML parser so this script has no dependencies of its own.
87109 if [ -z "$VERSION" ]; then