mirror of
https://github.com/bitcoin/bips.git
synced 2026-03-02 15:43:53 +00:00
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.
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user