You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#!/bin/bash
|
|
|
|
# Check rust-toolchain file
|
|
TOOLCHAIN_VERSION=$(cat rust-toolchain)
|
|
|
|
# Check workspace Cargo.toml file
|
|
CARGO_VERSION=$(cat Cargo.toml | grep "rust-version" | cut -d '"' -f 2)
|
|
if [ "$CARGO_VERSION" != "$TOOLCHAIN_VERSION" ]; then
|
|
echo "Mismatch in Cargo.toml: Expected $TOOLCHAIN_VERSION, found $CARGO_VERSION"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Rust versions match ✅"
|