Files
USB-AIO/scripts/build-release.sh
Denis Stoecklmeier 9dc37d1ece
Some checks failed
Tests / test (push) Has been cancelled
Qualitätsprüfungen und Fehlerpfade härten
2026-10-15 10:05:48 +02:00

16 lines
755 B
Bash

#!/usr/bin/env bash
set -Eeuo pipefail
ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
export CSR_BUILD_ID
CSR_BUILD_ID=$(python3 "$ROOT/scripts/release-manifest.py" --source-id)
for component in scanner controller gui; do
cargo fmt --check --manifest-path "$ROOT/$component/Cargo.toml"
cargo clippy --locked --manifest-path "$ROOT/$component/Cargo.toml" --all-targets -- -D warnings
cargo test --locked --manifest-path "$ROOT/$component/Cargo.toml"
cargo build --locked --release --manifest-path "$ROOT/$component/Cargo.toml"
done
python3 -m unittest discover -s "$ROOT/tests" -p 'test_*.py'
bash "$ROOT/tests/smoke.sh"
python3 "$ROOT/scripts/release-manifest.py" --create "$ROOT/build/release.json"
echo "Validated release: $CSR_BUILD_ID"