diff options
author | Bert Belder <bertbelder@gmail.com> | 2022-10-20 16:15:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-20 16:15:21 +0200 |
commit | a48d05fac779e53e92fe0e8b5668adf120f319e4 (patch) | |
tree | ff76b217ac4e5550d61ee00b36b37b07bc6542ff /cli/version.rs | |
parent | bfc1fb8d68f39b899e544eee66e3a08abfd350b0 (diff) |
feat(cli): check for updates in background (#15974)
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
Diffstat (limited to 'cli/version.rs')
-rw-r--r-- | cli/version.rs | 8 |
1 files changed, 8 insertions, 0 deletions
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()) } |