From 1431543b380a91d3c6d00e84cbb6cc789f490059 Mon Sep 17 00:00:00 2001 From: segfault_magnet Date: Mon, 6 May 2024 09:51:39 +0200 Subject: [PATCH] fix version checks --- .github/scripts/verify_chart_version.sh | 14 +++++++------- .github/workflows/ci.yml | 2 +- Cargo.toml | 1 + committer/Cargo.toml | 1 + e2e/Cargo.toml | 1 + packages/eth/Cargo.toml | 1 + packages/fuel/Cargo.toml | 1 + packages/metrics/Cargo.toml | 1 + packages/ports/Cargo.toml | 2 +- packages/services/Cargo.toml | 1 + packages/storage/Cargo.toml | 1 + 11 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/scripts/verify_chart_version.sh b/.github/scripts/verify_chart_version.sh index dcc16b68..c229527c 100755 --- a/.github/scripts/verify_chart_version.sh +++ b/.github/scripts/verify_chart_version.sh @@ -2,12 +2,12 @@ set -e err() { - echo -e "\e[31m\e[1merror:\e[0m $@" 1>&2; + echo -e "\e[31m\e[1merror:\e[0m $@" 1>&2 } status() { - WIDTH=12 - printf "\e[32m\e[1m%${WIDTH}s\e[0m %s\n" "$1" "$2" + WIDTH=12 + printf "\e[32m\e[1m%${WIDTH}s\e[0m %s\n" "$1" "$2" } # install dasel curl -sSLf "https://github.com/TomWright/dasel/releases/download/v1.24.3/dasel_linux_amd64" -L -o dasel @@ -15,10 +15,10 @@ chmod +x dasel mv ./dasel /usr/local/bin/dasel # check appVersion with crate package metadata HELM_APP_VERSION=$(cat deployment/charts/Chart.yaml | dasel -r yaml 'appVersion') -CRATE_VERSION=$(cat Cargo.toml | dasel -r toml 'package.version') +CRATE_VERSION=$(cat Cargo.toml | dasel -r toml 'workspace.package.version') if [ "$HELM_APP_VERSION" != "$CRATE_VERSION" ]; then - err "crate version $CRATE_VERSION, doesn't match helm app version $HELM_APP_VERSION" - exit 1 + err "crate version $CRATE_VERSION, doesn't match helm app version $HELM_APP_VERSION" + exit 1 else - status "crate version matches helm chart app version $HELM_APP_VERSION" + status "crate version matches helm chart app version $HELM_APP_VERSION" fi diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99b72565..8bb30e57 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: - run: | curl -sSLf "$DASEL_VERSION" -L -o dasel && chmod +x dasel mv ./dasel /usr/local/bin/dasel - MIN_VERSION=$(cat Cargo.toml | dasel -r toml 'package.rust-version') + MIN_VERSION=$(cat Cargo.toml | dasel -r toml 'workspace.package.rust-version') RUST_VERSION="${{ env.RUST_VERSION }}" echo "Comparing minimum supported toolchain ($MIN_VERSION) with ci toolchain (RUST_VERSION)" test "$MIN_VERSION" == "$RUST_VERSION" diff --git a/Cargo.toml b/Cargo.toml index 7bdf9957..68477a11 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,6 +18,7 @@ edition = "2021" homepage = "https://fuel.network/" license = "Apache-2.0" repository = "https://github.com/FuelLabs/fuel-block-committer" +rust-version = "1.77" publish = false [workspace.dependencies] diff --git a/committer/Cargo.toml b/committer/Cargo.toml index 47487a64..a3a9befa 100644 --- a/committer/Cargo.toml +++ b/committer/Cargo.toml @@ -7,6 +7,7 @@ license = { workspace = true } repository = { workspace = true } version = { workspace = true } publish = { workspace = true } +rust-version = { workspace = true } [dependencies] actix-web = { workspace = true, features = ["macros"] } diff --git a/e2e/Cargo.toml b/e2e/Cargo.toml index 4871fc69..fff6e70d 100644 --- a/e2e/Cargo.toml +++ b/e2e/Cargo.toml @@ -7,6 +7,7 @@ license = { workspace = true } repository = { workspace = true } version = { workspace = true } publish = { workspace = true } +rust-version = { workspace = true } [dev-dependencies] anyhow = { workspace = true } diff --git a/packages/eth/Cargo.toml b/packages/eth/Cargo.toml index c51ffb26..e5360619 100644 --- a/packages/eth/Cargo.toml +++ b/packages/eth/Cargo.toml @@ -7,6 +7,7 @@ license = { workspace = true } repository = { workspace = true } version = { workspace = true } publish = { workspace = true } +rust-version = { workspace = true } [dependencies] async-trait = { workspace = true } diff --git a/packages/fuel/Cargo.toml b/packages/fuel/Cargo.toml index 5621f4bc..13836028 100644 --- a/packages/fuel/Cargo.toml +++ b/packages/fuel/Cargo.toml @@ -7,6 +7,7 @@ license = { workspace = true } repository = { workspace = true } version = { workspace = true } publish = { workspace = true } +rust-version = { workspace = true } [dependencies] async-trait = { workspace = true } diff --git a/packages/metrics/Cargo.toml b/packages/metrics/Cargo.toml index 35bd210d..658ac3ed 100644 --- a/packages/metrics/Cargo.toml +++ b/packages/metrics/Cargo.toml @@ -7,6 +7,7 @@ license = { workspace = true } repository = { workspace = true } version = { workspace = true } publish = { workspace = true } +rust-version = { workspace = true } [dependencies] prometheus = { workspace = true } diff --git a/packages/ports/Cargo.toml b/packages/ports/Cargo.toml index 1178bdfc..dc738cf4 100644 --- a/packages/ports/Cargo.toml +++ b/packages/ports/Cargo.toml @@ -7,7 +7,7 @@ license = { workspace = true } repository = { workspace = true } version = { workspace = true } publish = { workspace = true } -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +rust-version = { workspace = true } [dependencies] async-trait = { workspace = true, optional = true } diff --git a/packages/services/Cargo.toml b/packages/services/Cargo.toml index 9e10926b..db8c1d25 100644 --- a/packages/services/Cargo.toml +++ b/packages/services/Cargo.toml @@ -7,6 +7,7 @@ license = { workspace = true } repository = { workspace = true } version = { workspace = true } publish = { workspace = true } +rust-version = { workspace = true } [dependencies] async-trait = { workspace = true } diff --git a/packages/storage/Cargo.toml b/packages/storage/Cargo.toml index b0bbd045..91a61f99 100644 --- a/packages/storage/Cargo.toml +++ b/packages/storage/Cargo.toml @@ -7,6 +7,7 @@ license = { workspace = true } repository = { workspace = true } version = { workspace = true } publish = { workspace = true } +rust-version = { workspace = true } [dependencies] async-trait = { workspace = true }