1#!/usr/bin/env bash
Fail if a version written outside mise.toml differs from the one in it. mise.toml is the one place versions live; these are the few other files that cannot read it and so repeat one.
tools/check-versions.sh
Needs only POSIX tools: it reads mise.toml's key = "value" lines, not a TOML parser.
14wb="$(tool 'cargo:wasm-bindgen-cli')" 15[ -n "$wb" ] || bad "mise.toml has no cargo:wasm-bindgen-cli" 16pin="$(grep -m1 -E '^wasm-bindgen *= *"=' Cargo.toml | sed -E 's/.*"=([^"]*)".*/\1/')" 17[ "$pin" = "$wb" ] || bad "Cargo.toml pins wasm-bindgen $pin, mise.toml installs the CLI $wb" 18 19hk="$(tool hk)" 20grep -q "hk@$hk#" hk.pkl || bad "hk.pkl does not reference hk $hk (the release mise.toml installs)"
Nothing may pin a tool version in the flake: it only wraps mise.