Files
webTemplate/build.sh
2025-08-26 00:07:59 +02:00

15 lines
556 B
Bash
Executable File

#!/bin/sh
rm webTemplate-*
version="$(cat Cargo.toml | grep '^version' | sed -e 's/^.*"\([^"]*\)".*$/\1/')"
commit="$(git show --oneline -s | sed -e 's/ .*$//')"
dirty="$(test "$(git diff --shortstat 2> /dev/null | tail -n1)" == "" || echo -n "_drity" )"
echo "pub const VERSION: &'static str = \"${version} (${commit}${dirty})\";" >src/version.rs
cross build --target aarch64-unknown-linux-gnu --release
cargo build --release
cp target/aarch64-unknown-linux-gnu/release/webTemplate webTemplate-aarch64
cp target/release/webTemplate webTemplate-x86_64