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.
Every PostgreSQL major in build/defs.bzl has a server in mise.toml, and no other.
15majors=$(sed -n 's/^PG_MAJORS = \[\(.*\)\].*/\1/p' build/defs.bzl | tr -d '" ' | tr ',' ' ') 16have=$(grep -m1 -E '^"conda:postgresql" *=' mise.toml | grep -oE '"[0-9]+\.[0-9]+"' | tr -d '"' | cut -d. -f1 | sort -n | tr '\n' ' ') 17want=$(echo $majors | tr ' ' '\n' | sort -n | tr '\n' ' ') 18[ "$have" = "$want" ] || bad "build/defs.bzl supports majors [$want] but mise.toml installs servers for [$have]"
cargo-pgrx must be the pgrx the graph resolves.
Nothing may pin a tool version in the flake: it only wraps mise.