scripts: update: also update rust-toolchain

This commit is contained in:
nym21
2025-12-21 13:59:06 +01:00
parent aebca14d78
commit e1ad45f44b
4 changed files with 17 additions and 5 deletions
+12 -1
View File
@@ -1,7 +1,18 @@
#!/usr/bin/env bash
set -e
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
TOOLCHAIN_FILE="$SCRIPT_DIR/../rust-toolchain.toml"
rustup update
# Update rust-toolchain.toml with current stable version
RUST_VERSION=$(rustup run stable rustc --version | awk '{print $2}')
echo "[toolchain]" > "$TOOLCHAIN_FILE"
echo "channel = \"$RUST_VERSION\"" >> "$TOOLCHAIN_FILE"
echo "Updated rust-toolchain.toml to $RUST_VERSION"
cargo clean
rustup update
cargo upgrade --incompatible
cargo update
cargo build --package brk