From 04b448b599cb16beae40ba9a98df9f262da522f7 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Sat, 20 Dec 2025 13:18:41 +1000 Subject: [PATCH] CI: commit README.mediawiki delta from script to git (#2063) Use a hardcoded delta rather than requiring the delta to never change, so that it can be changed deliberately when desired without breaking CI. Also avoids the need to checkout the previous commit, so no longer changes the repository state. --- scripts/diffcheck.expected | 24 ++++++++++++++++++++++++ scripts/diffcheck.sh | 14 ++++---------- 2 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 scripts/diffcheck.expected diff --git a/scripts/diffcheck.expected b/scripts/diffcheck.expected new file mode 100644 index 00000000..3cc6ee77 --- /dev/null +++ b/scripts/diffcheck.expected @@ -0,0 +1,24 @@ +< |- +< | 40 +< | API/RPC +< | Stratum wire protocol +< | Marek Palatinus +< | Standard +< | BIP number allocated +< |- +< | 41 +< | API/RPC +< | Stratum mining protocol +< | Marek Palatinus +< | Standard +< | BIP number allocated +< |- +< | 63 +< | Applications +< | Stealth Addresses +< | Peter Todd +< | Standard +< | BIP number allocated +< | Leon Olsson Curr, Pearlwort Sneed, Andrew Poelstra +> | Leon Olsson Curr and Pearlwort Sneed, Andrew Poelstra +< |} diff --git a/scripts/diffcheck.sh b/scripts/diffcheck.sh index aa9f557c..793bcb84 100755 --- a/scripts/diffcheck.sh +++ b/scripts/diffcheck.sh @@ -2,15 +2,9 @@ scripts/buildtable.pl >/tmp/table.mediawiki 2> /dev/null diff README.mediawiki /tmp/table.mediawiki | grep '^[<>] |' >/tmp/after.diff || true -if git checkout HEAD^ && scripts/buildtable.pl >/tmp/table.mediawiki 2>/dev/null; then - diff README.mediawiki /tmp/table.mediawiki | grep '^[<>] |' >/tmp/before.diff || true - newdiff=$(diff -s /tmp/before.diff /tmp/after.diff -u | grep '^+') - if [ -n "$newdiff" ]; then - echo "$newdiff" - exit 1 - fi - echo "README table matches expected table from BIP files" -else - echo 'Cannot build previous commit table for comparison' +newdiff=$(diff -s scripts/diffcheck.expected /tmp/after.diff -u | grep '^[-+]') +if [ -n "$newdiff" ]; then + echo "$newdiff" exit 1 fi +echo "README table matches expected table from BIP files"