Some checks failed
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 13s
WAI breaking changes and the conformance runner / WAI breaking · does this change touch WAI (pull_request) Successful in 11s
WAI examples / WAI examples · does this change touch them (pull_request) Successful in 10s
WAI breaking changes and the conformance runner / WAI breaking · wire, record and API against main · linux (pull_request) Successful in 36s
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 3m38s
WAI breaking changes and the conformance runner / WAI breaking and conform · their tests, and the independent verifiers through wai conform · linux (pull_request) Successful in 2m31s
WAI examples / WAI examples · android-app · linux-arm64 (pull_request) Successful in 5m39s
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Successful in 6m52s
WAI examples / WAI examples · portable · linux (pull_request) Successful in 8m34s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 10m20s
WAI examples / WAI examples · the archive, the readiness check, the browser and Apple · macos (pull_request) Failing after 9m43s
The release workflow's first job checks that the installer's default is the tagged version; the 0.4.0 bump missed it, so the wai-v0.4.0 run stopped there before building anything. Co-Authored-By: Claude Opus 5.5 <[email protected]>
43 lines
2 KiB
Shell
Executable file
43 lines
2 KiB
Shell
Executable file
#!/bin/sh
|
|
# Install the WAI command line, and what `wai dev` runs, from the forge's releases:
|
|
#
|
|
# curl -fsSL https://wai.transaction.science/install.sh | sh
|
|
#
|
|
# It picks the archive for this system (macOS or Linux, arm64 or x86_64), checks it against the
|
|
# SHA-256 the release states, and unpacks it into $WAI_HOME (default ~/.wai): bin/ and
|
|
# share/wai/web/ side by side. Then it says which line puts ~/.wai/bin on your PATH. Nothing
|
|
# else is changed. WAI_VERSION picks a release (default: the one below).
|
|
set -eu
|
|
VERSION="${WAI_VERSION:-0.4.0}"
|
|
DEST="${WAI_HOME:-$HOME/.wai}"
|
|
BASE="https://git.transaction.science/Transaction-Science/open-standards/releases/download/wai-v$VERSION"
|
|
case "$(uname -s)" in
|
|
Darwin) os=apple-darwin ;;
|
|
Linux) os=unknown-linux-musl ;;
|
|
*) echo "wai: no archive for $(uname -s); build from source: https://wai.transaction.science/docs/quickstart/" >&2; exit 1 ;;
|
|
esac
|
|
case "$(uname -m)" in
|
|
arm64 | aarch64) cpu=aarch64 ;;
|
|
x86_64 | amd64) cpu=x86_64 ;;
|
|
*) echo "wai: no archive for $(uname -m)" >&2; exit 1 ;;
|
|
esac
|
|
NAME="wai-$VERSION-$cpu-$os"
|
|
TMP="$(mktemp -d)"
|
|
trap 'rm -rf "$TMP"' EXIT
|
|
echo "wai: fetching $NAME"
|
|
curl -fsSL -o "$TMP/$NAME.tar.gz" "$BASE/$NAME.tar.gz"
|
|
curl -fsSL -o "$TMP/$NAME.tar.gz.sha256" "$BASE/$NAME.tar.gz.sha256"
|
|
want="$(cut -d' ' -f1 "$TMP/$NAME.tar.gz.sha256")"
|
|
if command -v sha256sum > /dev/null 2>&1; then got="$(sha256sum "$TMP/$NAME.tar.gz" | cut -d' ' -f1)"; else got="$(shasum -a 256 "$TMP/$NAME.tar.gz" | cut -d' ' -f1)"; fi
|
|
[ "$got" = "$want" ] || { echo "wai: the archive's SHA-256 is $got, not the release's $want; nothing installed" >&2; exit 1; }
|
|
tar -xzf "$TMP/$NAME.tar.gz" -C "$TMP"
|
|
mkdir -p "$DEST"
|
|
rm -rf "$DEST/bin" "$DEST/share/wai"
|
|
mkdir -p "$DEST/share"
|
|
mv "$TMP/$NAME/bin" "$DEST/bin"
|
|
mv "$TMP/$NAME/share/wai" "$DEST/share/wai"
|
|
cp "$TMP/$NAME/README.md" "$TMP/$NAME/LICENSE" "$DEST/"
|
|
"$DEST/bin/wai" create --list > /dev/null
|
|
echo "wai: installed in $DEST. Put it on your PATH:"
|
|
echo " export PATH=\"$DEST/bin:\$PATH\""
|
|
echo "then: wai hello"
|