1 parent
27a53c3c6a
commit
47c3cd7f65
2 files changed
+5645
-10
No files matched your search
Generated
+5623
File diff suppressed because it is too large.
Load diff
+22
-10
@@ -4,13 +4,8 @@ set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
cd "$ROOT"
|
||||
|
||||
# Cargo.lock is generated only for the locked build/test phase. Keep source releases
|
||||
# and the working tree clean so the offline/static gate is repeatable.
|
||||
cleanup_lockfile() {
|
||||
rm -f "$ROOT/Cargo.lock"
|
||||
}
|
||||
trap cleanup_lockfile EXIT
|
||||
rm -f "$ROOT/Cargo.lock"
|
||||
# Keep Cargo.lock for reproducible application/package builds.
|
||||
# Generate it only when missing.
|
||||
|
||||
if ! command -v cargo >/dev/null 2>&1; then
|
||||
echo "error: Rust/Cargo is required" >&2
|
||||
@@ -35,16 +30,33 @@ else
|
||||
fi
|
||||
|
||||
if [[ ! -f Cargo.lock ]]; then
|
||||
echo "Cargo.lock not found - generating it..."
|
||||
cargo generate-lockfile
|
||||
fi
|
||||
|
||||
cargo fmt --all
|
||||
cargo fmt --all -- --check
|
||||
|
||||
cargo test --locked
|
||||
cargo clippy --locked --all-targets -- -D warnings
|
||||
cargo build --release --locked
|
||||
|
||||
cargo clippy \
|
||||
--locked \
|
||||
--all-targets \
|
||||
-- \
|
||||
-D warnings
|
||||
|
||||
cargo build \
|
||||
--release \
|
||||
--locked
|
||||
|
||||
BIN="$ROOT/target/release/rustbox"
|
||||
test -x "$BIN"
|
||||
|
||||
if [[ ! -x "$BIN" ]]; then
|
||||
echo "error: RustBox binary was not produced: $BIN" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
"$BIN" --version
|
||||
|
||||
printf 'Built RustBox: %s\n' "$BIN"
|
||||
printf 'Cargo.lock retained: %s\n' "$ROOT/Cargo.lock"
|
||||
Reference in new issue
Block a user