Files
RustBox/scripts/build-release.sh
T
Mateusz Gruszczyński bc5fbd6ba9
RustBox CI / rustbox (push) Waiting to run
first commit
2026-10-29 15:24:59 +01:00

24 lines
521 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT"
if ! command -v cargo >/dev/null 2>&1; then
echo "error: Rust/Cargo is required" >&2
exit 1
fi
if find "$ROOT" -type f \( -name '*.ts' -o -name '*.tsx' \) -print -quit | grep -q .; then
echo "error: TypeScript source found in RustBox" >&2
exit 1
fi
cargo test --locked
cargo build --release --locked
BIN="$ROOT/target/release/rustbox"
test -x "$BIN"
"$BIN" --version
printf 'Built RustBox: %s\n' "$BIN"