From 961ee2eb342259398916dfe7458098f7c9297c11 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Thu, 18 Jun 2026 05:04:21 +0800 Subject: feat: add build script for version info and shell completions Introduce a build.rs that generates a version.txt file with the package version, git commit hash, and date. Also generate shell completion scripts using mingling's build utilities. Migrate the `-v/--version` flag to read from the generated version.txt and replace BasicProgramSetup with HelpFlagSetup. --- rola-cli/Cargo.toml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'rola-cli/Cargo.toml') diff --git a/rola-cli/Cargo.toml b/rola-cli/Cargo.toml index a04a403..6b45c5a 100644 --- a/rola-cli/Cargo.toml +++ b/rola-cli/Cargo.toml @@ -23,5 +23,17 @@ rev = "002f3fd390f64b1d7632f8530a0db81d45edf6c2" features = [ "parser", "extra_macros", - "dispatch_tree" + "dispatch_tree", + "comp" ] + +[build-dependencies.mingling] +git = "https://github.com/mingling-rs/mingling.git" +rev = "002f3fd390f64b1d7632f8530a0db81d45edf6c2" +features = [ + "builds", + "comp" +] + +[build-dependencies] +chrono = "0.4.45" -- cgit