From dab048f6b3af964587b6accaa90e8730173d9f54 Mon Sep 17 00:00:00 2001 From: Gan Jun Kai Date: Wed, 6 Mar 2024 15:51:32 +0800 Subject: [PATCH 1/2] feat: set canary channel as default --- cli/src/commands/mod.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cli/src/commands/mod.rs b/cli/src/commands/mod.rs index ad482711..b265d244 100644 --- a/cli/src/commands/mod.rs +++ b/cli/src/commands/mod.rs @@ -110,11 +110,9 @@ pub enum CommandGroup { impl ClapApp { pub async fn execute(&self) -> Result { debug!("current cli version: {}", crate_version!()); - let channel = if self.canary { - ApiChannel::Canary - } else { - ApiChannel::Stable - }; + + // starting from v2.1.0, the CLI will use the Canary channel API by default. + let channel = ApiChannel::Canary; debug!("API channel: {:?}", channel); let command = match &self.command_group { From 8c76ea6dbd6baca297c64c311a9d73eee423a5d0 Mon Sep 17 00:00:00 2001 From: Gan Jun Kai Date: Wed, 6 Mar 2024 15:56:07 +0800 Subject: [PATCH 2/2] feat: make canary flag true by default --- cli/src/commands/mod.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cli/src/commands/mod.rs b/cli/src/commands/mod.rs index b265d244..90e5f75e 100644 --- a/cli/src/commands/mod.rs +++ b/cli/src/commands/mod.rs @@ -50,7 +50,7 @@ pub struct ClapApp { pub report: bool, /// Use the Canary channel API - #[arg(long, global = true)] + #[arg(long, global = true, default_value_t = true)] canary: bool, } @@ -110,9 +110,12 @@ pub enum CommandGroup { impl ClapApp { pub async fn execute(&self) -> Result { debug!("current cli version: {}", crate_version!()); + let channel = if self.canary { + ApiChannel::Canary + } else { + ApiChannel::Stable + }; - // starting from v2.1.0, the CLI will use the Canary channel API by default. - let channel = ApiChannel::Canary; debug!("API channel: {:?}", channel); let command = match &self.command_group {