add hint when `options.md` is outdated (#5367)

Make it clearer what went wrong when lint fails due to 'options.md'
being out of date.
This commit is contained in:
Etan Kissling 2023-08-29 14:16:15 +02:00 committed by GitHub
parent 09020ebd2f
commit 6daa7542a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 7 deletions

17
ci/Jenkinsfile vendored
View File

@ -70,13 +70,16 @@ pipeline {
sh 'make LOG_LEVEL=TRACE'
/* Check documentation reflects `nimbus_beacon_node --help`. */
sh '''#!/usr/bin/env bash
diff -u \\
<(sed -n '/Usage/,/^...$/ { /^...$/d; p; }' \\
docs/the_nimbus_book/src/options.md) \\
<(COLUMNS=200 build/nimbus_beacon_node --help | \\
sed -n '/Usage/,/Available sub-commands/ { /Available sub-commands/d; p; }' | \\
sed 's/\\x1B\\[[0-9;]*[mG]//g' | \\
sed 's/[[:space:]]*$//')
if ! diff -u \\
<(sed -n '/Usage/,/^...$/ { /^...$/d; p; }' \\
docs/the_nimbus_book/src/options.md) \\
<(COLUMNS=200 build/nimbus_beacon_node --help | \\
sed -n '/Usage/,/Available sub-commands/ { /Available sub-commands/d; p; }' | \\
sed 's/\\x1B\\[[0-9;]*[mG]//g' | \\
sed 's/[[:space:]]*$//'); then \\
echo "Please update 'options.md' to match 'nimbus_beacon_node --version'"; \\
false; \\
fi
'''
} }
}