From 1f488b3564801ea60072363feb55b45fd26cdd20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaya=20G=C3=B6kalp?= Date: Sat, 2 Sep 2023 01:52:26 +0300 Subject: [PATCH] feat: add beta-4 support (#480) * feat: add beta-4 support * docs: update docs * trigger CI * add markdown-link-check-disable to channels.md --------- Co-authored-by: JoshuaBatty --- docs/src/concepts/channels.md | 10 ++++++++++ src/channel.rs | 14 +++++++++++--- src/constants.rs | 1 + src/toolchain.rs | 3 +++ 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/docs/src/concepts/channels.md b/docs/src/concepts/channels.md index 4e9898cea..6692d9088 100644 --- a/docs/src/concepts/channels.md +++ b/docs/src/concepts/channels.md @@ -10,6 +10,8 @@ | **[nightly]** | `master` branch | ➖ | nightly (1:00 AM UTC) | ✔️ | | **[beta-3]** | published bins | ➖ | only when necessary | ✔️ | | **[beta-4-rc]** | published bins | ➖ | only when necessary | ✔️ | +| **[beta-4-rc2]** | published bins | ➖ | only when necessary | ✔️ | +| **[beta-4]** | published bins | ➖ | only when necessary | ✔️ | ## The `beta-3` channel @@ -24,6 +26,12 @@ The `beta-4-rc` channel offers developers an early opportunity to test out new f The `beta-4-rc.2` channel offers developers an early opportunity to test out new features and improvements, including enhancements and bug fixes made since the beta-4-rc version. If maintaining compatibility with the beta-3 testnet is required for your project, we recommend you continue using the beta-3 toolchain. The components to be installed can be found [here](https://github.com/FuelLabs/fuelup/blob/gh-pages/channel-fuel-beta-4-rc-2.toml). +## The `beta-4` channel + + +The `beta-4` channel is a published TOML file describing the toolchain that is compatible with our [beta-4 testnet](https://fuel-labs.ghost.io/announcing-beta-4-testnet/). This toolchain should be used to interact with and build on the testnet. The components to be installed can be found [here](https://github.com/FuelLabs/fuelup/blob/gh-pages/channel-fuel-beta-4.toml). + + ## The `nightly` channel @@ -93,4 +101,6 @@ You may also use [nektos/act](https://github.com/nektos/act) to run the workflow [nightly]: #the-nightly-channel [beta-3]: #the-beta-3-channel [beta-4-rc]: #the-beta-4-rc-channel +[beta-4-rc2]: #the-beta-4-rc2-channel +[beta-4]: #the-beta-4-channel [gh-pages]: https://github.com/FuelLabs/fuelup/tree/gh-pages diff --git a/src/channel.rs b/src/channel.rs index 9cb666af9..5de1acb2e 100644 --- a/src/channel.rs +++ b/src/channel.rs @@ -1,8 +1,9 @@ use crate::{ constants::{ CHANNEL_BETA_1_FILE_NAME, CHANNEL_BETA_2_FILE_NAME, CHANNEL_BETA_3_FILE_NAME, - CHANNEL_BETA_4_RC_2_FILE_NAME, CHANNEL_BETA_4_RC_FILE_NAME, CHANNEL_LATEST_FILE_NAME, - CHANNEL_NIGHTLY_FILE_NAME, DATE_FORMAT_URL_FRIENDLY, FUELUP_GH_PAGES, + CHANNEL_BETA_4_FILE_NAME, CHANNEL_BETA_4_RC_2_FILE_NAME, CHANNEL_BETA_4_RC_FILE_NAME, + CHANNEL_LATEST_FILE_NAME, CHANNEL_NIGHTLY_FILE_NAME, DATE_FORMAT_URL_FRIENDLY, + FUELUP_GH_PAGES, }, download::{download, DownloadCfg}, toolchain::{DistToolchainDescription, DistToolchainName}, @@ -23,6 +24,7 @@ pub const BETA_2: &str = "beta-2"; pub const BETA_3: &str = "beta-3"; pub const BETA_4_RC: &str = "beta-4-rc"; pub const BETA_4_RC_2: &str = "beta-4-rc.2"; +pub const BETA_4: &str = "beta-4"; pub const NIGHTLY: &str = "nightly"; #[derive(Debug, Deserialize, Serialize)] @@ -44,7 +46,12 @@ pub struct Package { } pub fn is_beta_toolchain(name: &str) -> bool { - name == BETA_1 || name == BETA_2 || name == BETA_3 || name == BETA_4_RC || name == BETA_4_RC_2 + name == BETA_1 + || name == BETA_2 + || name == BETA_3 + || name == BETA_4_RC + || name == BETA_4_RC_2 + || name == BETA_4 } fn format_nightly_url(date: &Date) -> Result { @@ -77,6 +84,7 @@ fn construct_channel_url(desc: &DistToolchainDescription) -> Result { DistToolchainName::Beta3 => url.push_str(CHANNEL_BETA_3_FILE_NAME), DistToolchainName::Beta4Rc => url.push_str(CHANNEL_BETA_4_RC_FILE_NAME), DistToolchainName::Beta4Rc2 => url.push_str(CHANNEL_BETA_4_RC_2_FILE_NAME), + DistToolchainName::Beta4 => url.push_str(CHANNEL_BETA_4_FILE_NAME), }; Ok(url) diff --git a/src/constants.rs b/src/constants.rs index 0e9898168..b9e0b7803 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -13,6 +13,7 @@ pub const CHANNEL_BETA_2_FILE_NAME: &str = "channel-fuel-beta-2.toml"; pub const CHANNEL_BETA_3_FILE_NAME: &str = "channel-fuel-beta-3.toml"; pub const CHANNEL_BETA_4_RC_FILE_NAME: &str = "channel-fuel-beta-4-rc.toml"; pub const CHANNEL_BETA_4_RC_2_FILE_NAME: &str = "channel-fuel-beta-4-rc-2.toml"; +pub const CHANNEL_BETA_4_FILE_NAME: &str = "channel-fuel-beta-4.toml"; pub const DATE_FORMAT: &[FormatItem] = format_description!("[year]-[month]-[day]"); pub const DATE_FORMAT_URL_FRIENDLY: &[FormatItem] = format_description!("[year]/[month]/[day]"); diff --git a/src/toolchain.rs b/src/toolchain.rs index 1a43910c4..fca14d1d7 100644 --- a/src/toolchain.rs +++ b/src/toolchain.rs @@ -39,6 +39,7 @@ pub enum DistToolchainName { Beta3, Beta4Rc, Beta4Rc2, + Beta4, Latest, Nightly, } @@ -53,6 +54,7 @@ impl fmt::Display for DistToolchainName { DistToolchainName::Beta3 => write!(f, "{}", channel::BETA_3), DistToolchainName::Beta4Rc => write!(f, "{}", channel::BETA_4_RC), DistToolchainName::Beta4Rc2 => write!(f, "{}", channel::BETA_4_RC_2), + DistToolchainName::Beta4 => write!(f, "{}", channel::BETA_4), } } } @@ -68,6 +70,7 @@ impl FromStr for DistToolchainName { channel::BETA_3 => Ok(Self::Beta3), channel::BETA_4_RC => Ok(Self::Beta4Rc), channel::BETA_4_RC_2 => Ok(Self::Beta4Rc2), + channel::BETA_4 => Ok(Self::Beta4), _ => bail!("Unknown name for toolchain: {}", s), } }