mirror of
https://github.com/arnaucube/miden-crypto.git
synced 2026-01-31 00:06:40 +01:00
16 lines
466 B
Bash
Executable File
16 lines
466 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Get rust-toolchain.toml file channel
|
|
TOOLCHAIN_VERSION=$(grep 'channel' rust-toolchain.toml | sed -E 's/.*"(.*)".*/\1/')
|
|
|
|
# Get workspace Cargo.toml file rust-version
|
|
CARGO_VERSION=$(grep 'rust-version' Cargo.toml | sed -E 's/.*"(.*)".*/\1/')
|
|
|
|
# Check version match
|
|
if [ "$CARGO_VERSION" != "$TOOLCHAIN_VERSION" ]; then
|
|
echo "Mismatch in Cargo.toml: Expected $TOOLCHAIN_VERSION, found $CARGO_VERSION"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Rust versions match ✅"
|