feat: --version 嵌入构建期 git 哈希并新增新鲜度检查脚本

This commit is contained in:
2026-09-26 07:04:55 +00:00
parent fe3e84be6b
commit 83ff9bbca1
6 changed files with 114 additions and 2 deletions
+6 -1
View File
@@ -25,7 +25,12 @@ use oxide_vm::JsValue;
mod bench;
#[derive(Parser)]
#[command(name = "oxide", version, about = "OxideJS - Rust JavaScript engine")]
#[command(
name = "oxide",
// 版本号后附构建期 git 短哈希,`--version` 自报即新鲜度自证锚点。
version = concat!(env!("CARGO_PKG_VERSION"), " (", env!("GIT_COMMIT"), ")"),
about = "OxideJS - Rust JavaScript engine"
)]
struct Cli {
#[command(subcommand)]
command: Option<Commands>,