* feat: show dynamic build number in status bar (bNNN format) Replace hardcoded v0.4.2 with a dynamic build number derived from git rev-list --count HEAD at compile time. The count is embedded via build.rs and exposed through a get_build_number Tauri command. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * design: add build-number-status-bar wireframes (status bar with dynamic b-number) * fix: use runtime env var for BUILD_NUMBER (compile-time env! not available in CI) * style: rustfmt format get_build_number --------- Co-authored-by: Test <test@test.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
15 lines
408 B
Rust
15 lines
408 B
Rust
fn main() {
|
|
let count = std::process::Command::new("git")
|
|
.args(["rev-list", "--count", "HEAD"])
|
|
.output()
|
|
.ok()
|
|
.filter(|o| o.status.success())
|
|
.and_then(|o| String::from_utf8(o.stdout).ok())
|
|
.map(|s| s.trim().to_string())
|
|
.unwrap_or_else(|| "DEV".to_string());
|
|
|
|
println!("cargo:rustc-env=BUILD_NUMBER={}", count);
|
|
|
|
tauri_build::build()
|
|
}
|