From a48d05fac779e53e92fe0e8b5668adf120f319e4 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 20 Oct 2022 16:15:21 +0200 Subject: feat(cli): check for updates in background (#15974) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bartek IwaƄczuk Co-authored-by: Divy Srivastava --- cli/version.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cli/version.rs') diff --git a/cli/version.rs b/cli/version.rs index 00301c85d..1a96eb234 100644 --- a/cli/version.rs +++ b/cli/version.rs @@ -14,6 +14,14 @@ pub fn is_canary() -> bool { option_env!("DENO_CANARY").is_some() } +pub fn release_version_or_canary_commit_hash() -> &'static str { + if is_canary() { + GIT_COMMIT_HASH + } else { + env!("CARGO_PKG_VERSION") + } +} + pub fn get_user_agent() -> String { format!("Deno/{}", deno()) } -- cgit v1.2.3