Skip to content

Commit

Permalink
fix version checks
Browse files Browse the repository at this point in the history
  • Loading branch information
segfault-magnet committed May 6, 2024
1 parent 7e8d07e commit 1431543
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 9 deletions.
14 changes: 7 additions & 7 deletions .github/scripts/verify_chart_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
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
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
1 change: 1 addition & 0 deletions committer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
1 change: 1 addition & 0 deletions e2e/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
1 change: 1 addition & 0 deletions packages/eth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
1 change: 1 addition & 0 deletions packages/fuel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
1 change: 1 addition & 0 deletions packages/metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ license = { workspace = true }
repository = { workspace = true }
version = { workspace = true }
publish = { workspace = true }
rust-version = { workspace = true }

[dependencies]
prometheus = { workspace = true }
2 changes: 1 addition & 1 deletion packages/ports/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
1 change: 1 addition & 0 deletions packages/services/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
1 change: 1 addition & 0 deletions packages/storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit 1431543

Please sign in to comment.