From 5bd91977ee39c7274200a52c5b494398748306fe Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Mon, 25 May 2026 12:49:54 +0200 Subject: [PATCH] Add script for checking all commits in a branch --- scripts/check_commit.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 scripts/check_commit.sh diff --git a/scripts/check_commit.sh b/scripts/check_commit.sh new file mode 100755 index 000000000..9cc5e5c7b --- /dev/null +++ b/scripts/check_commit.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Run some tests on the current commit, similar to what CI does; useful for +# checking every commit in a branch with `git rebase -x scripts/check_commit.sh master`. + +set -e + +git diff --quiet || { + echo "Error: there are unstaged changes. Please stage or stash them before running this script." + exit 1 +} + +just test +just lint +just generate +git diff --quiet || { + echo "Error: auto-generated files not up to date." + exit 1 +}