diff options
Diffstat (limited to 'cli/version.rs')
-rw-r--r-- | cli/version.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cli/version.rs b/cli/version.rs index 4a71d7090..dbd63f614 100644 --- a/cli/version.rs +++ b/cli/version.rs @@ -23,8 +23,7 @@ pub static DENO_VERSION_INFO: Lazy<DenoVersionInfo> = Lazy::new(|| { }); DenoVersionInfo { - // TODO(bartlomieju): fix further for RC and LTS releases - deno: if IS_CANARY { + deno: if release_channel == ReleaseChannel::Canary { concat!( env!("CARGO_PKG_VERSION"), "+", @@ -39,8 +38,7 @@ pub static DENO_VERSION_INFO: Lazy<DenoVersionInfo> = Lazy::new(|| { git_hash: GIT_COMMIT_HASH, // Keep in sync with `deno` field. - // TODO(bartlomieju): fix further for RC and LTS releases - user_agent: if IS_CANARY { + user_agent: if release_channel == ReleaseChannel::Canary { concat!( "Deno/", env!("CARGO_PKG_VERSION"), @@ -77,7 +75,7 @@ impl DenoVersionInfo { /// For stable release, a semver like, eg. `v1.46.2`. /// For canary release a full git hash, eg. `9bdab6fb6b93eb43b1930f40987fa4997287f9c8`. pub fn version_or_git_hash(&self) -> &'static str { - if IS_CANARY { + if self.release_channel == ReleaseChannel::Canary { self.git_hash } else { CARGO_PKG_VERSION |