diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-08-16 21:42:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-16 22:42:19 +0200 |
commit | db75462bd6f01d4a470c2ed7b5aad2f9a877f150 (patch) | |
tree | 949922348def7305e73462ef2810648998c6316f /cli/args/flags.rs | |
parent | ff4226a3cd20ef6cfb155ca206c745785b6e098f (diff) |
refactor: show release channel in `deno --version` (#25061)
Also simplifies handling of various release channels in `deno upgrade`
subcommand.
Diffstat (limited to 'cli/args/flags.rs')
-rw-r--r-- | cli/args/flags.rs | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 38953a388..45c407cea 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -36,7 +36,6 @@ use std::path::PathBuf; use std::str::FromStr; use crate::args::resolve_no_prompt; -use crate::shared::ReleaseChannel; use crate::util::fs::canonicalize_path; use super::flags_net; @@ -1333,27 +1332,10 @@ static UNSTABLE_HEADING: &str = "Unstable"; pub fn clap_root() -> Command { let long_version = format!( - "{} ({}, {})\nv8 {}\ntypescript {}", + "{} ({}, {}, {})\nv8 {}\ntypescript {}", crate::version::DENO_VERSION_INFO.deno, - // TODO(bartlomieju): alter what's printed here. - // I think it's best if we print as follows: - // <version>(+<short_git_hash>) (<release_channel>, <profile>, <target>) - // For stable it would be: - // v1.46.0 (stable, release, aarch64-apple-darwin) - // For rc it would be: - // v1.46.0-rc.2 (release candidate, release, aarch64-apple-darwin) - // For lts it would be: - // v2.1.13-lts (LTS (long term support), release, aarch64-apple-darwin) - // For canary it would be: - // v1.46.0+25bb59d (canary, release, aarch64-apple-darwin) - if matches!( - crate::version::DENO_VERSION_INFO.release_channel, - ReleaseChannel::Canary - ) { - "canary" - } else { - env!("PROFILE") - }, + crate::version::DENO_VERSION_INFO.release_channel.name(), + env!("PROFILE"), env!("TARGET"), deno_core::v8_version(), crate::version::DENO_VERSION_INFO.typescript |