add --version flag
This commit is contained in:
7
build.sh
7
build.sh
@@ -1,5 +1,12 @@
|
||||
#!/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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user