Files
heartwood/build/rust-version.sh
T
Lorenz Leutgeb 244a8b6fca scripts, build: Name all scripts *.sh
… so that `just check-scripts` actually finds all of them.
2026-10-30 12:48:00 +01:00

12 lines
229 B
Bash
Executable File

#! /usr/bin/env sh
set -euo pipefail
if ! version=$(grep -m 1 -oP '^\s*channel\s*=\s*"?\K([\d\.]+)' rust-toolchain.toml)
then
echo "fatal: no rust version found via rust-toolchain.toml" >&2
exit 1
else
echo "$version"
fi