Files
brk/scripts/update.sh
2025-12-21 13:59:06 +01:00

19 lines
494 B
Bash
Executable File

#!/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
cargo upgrade --incompatible
cargo update
cargo build --package brk