diff --git a/cli/build.rs b/cli/build.rs index 1480bb5c7b67f..6be93777eb5e5 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -356,9 +356,15 @@ fn create_cli_snapshot(snapshot_path: PathBuf) -> CreateSnapshotOutput { use deno_runtime::permissions::PermissionsContainer; use std::sync::Arc; + // NOTE(bartlomieju): keep in sync with `cli/version.rs`. + // Ideally we could deduplicate that code. fn deno_version() -> String { if env::var("DENO_CANARY").is_ok() { - format!("{}+{}", env!("CARGO_PKG_VERSION"), git_commit_hash()) + format!( + "{}+{}", + env!("CARGO_PKG_VERSION"), + git_commit_hash()[..7].to_string() + ) } else { env!("CARGO_PKG_VERSION").to_string() }