diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 7b6bcce..fe14db3 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -8,6 +8,7 @@ on: env: CARGO_TERM_COLOR: always + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true jobs: build: diff --git a/Cargo.toml b/Cargo.toml index 0e44e16..e1aceb8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "src-cli" -version = "0.1.1" +version = "0.1.2" edition = "2021" [[bin]] diff --git a/src/main.rs b/src/main.rs index bb56afe..bafef97 100644 --- a/src/main.rs +++ b/src/main.rs @@ -47,7 +47,7 @@ fn run() -> i32 { 0 } cli::CliAction::Version => { - println!("0.1.0"); + println!("{}", env!("CARGO_PKG_VERSION")); 0 } cli::CliAction::Run(args) => execute(args), diff --git a/tests/integration_test.rs b/tests/integration_test.rs index dea1d7b..bd33d53 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -76,14 +76,14 @@ fn help_flag() { fn version_flag() { let (stdout, _, code) = run_src(&["--version"]); assert_eq!(code, 0); - assert!(stdout.trim().contains("0.1.")); + assert_eq!(stdout.trim(), env!("CARGO_PKG_VERSION")); } #[test] fn version_short_flag() { let (stdout, _, code) = run_src(&["-V"]); assert_eq!(code, 0); - assert!(stdout.trim().contains("0.1.")); + assert_eq!(stdout.trim(), env!("CARGO_PKG_VERSION")); } // ── File Listing ──