diff --git a/cli/build.rs b/cli/build.rs index 942c616981..d949b02c6e 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -47,7 +47,7 @@ fn main() -> std::io::Result<()> { if let Some((mut git_hash, maybe_date)) = get_git_timestamp_and_hash() { git_hash.truncate(16); println!( - "cargo:rustc-env=JJ_VERSION={}-{}-{}", + "cargo:rustc-env=JJ_VERSION={}+{}-{}", version, maybe_date .map(|d| d.format("%Y%m%d").to_string()) diff --git a/cli/tests/test_global_opts.rs b/cli/tests/test_global_opts.rs index 1d325fb788..9378191860 100644 --- a/cli/tests/test_global_opts.rs +++ b/cli/tests/test_global_opts.rs @@ -48,9 +48,9 @@ fn test_version() { let sanitized = stdout.replace(|c: char| c.is_ascii_hexdigit(), "?"); let expected = [ "jj ?.??.?\n", - "jj ?.??.?-????????-????????????????\n", + "jj ?.??.?+????????-????????????????\n", // `dateunknown` turns into `??t?unknown` since d,a,e are hex digits. - "jj ?.??.?-??t?unknown-????????????????\n", + "jj ?.??.?+??t?unknown-????????????????\n", ]; assert!( expected.contains(&sanitized.as_str()),