mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-18 03:27:41 +02:00
Merge #13863: travis: move script sections to files in .travis/ subject to shellcheck
414326952cuse export LC_ALL=C.UTF-8 (Julian Fleischer)728c82d029make script exit if a command fails (Julian Fleischer)506890b24dmove remaining travis build steps into individual files (Julian Fleischer)272306ea57number .travis/ script according to build lifecycle and add README to explain (Julian Fleischer)519e2739cfmove lint stage up to resemble travis build ui (Julian Fleischer)86d34f0e65abort script in END_FOLD on non-zero exit code (Julian Fleischer)4f2f88c7b0move script sections info individual files and comply with shellcheck (Julian Fleischer) Pull request description: This PR is extracted from https://github.com/bitcoin/bitcoin/pull/13816 to make that one easier to review. It follows on https://github.com/bitcoin/bitcoin/pull/13849 and https://github.com/bitcoin/bitcoin/pull/13851 In here the shell script parts from `travis.yml` are extracted into `.travis/before_install.sh`, `.travis/install.sh`, `.travis/before_script.sh`, `.travis/script.sh`, and `.travis/lint.sh`. This has the benefit that `test/lint/lint-shell.sh` will also shellcheck these parts. Also it makes the individual script parts more readable. Tree-SHA512: c497e1687ceb1c1d795de177d3fc35af908bc8e3f781a871afabdecf031e581d4db229290627249e35ef7c09952bc34884e4734ea91d40f57b4a9efb85bba2e3
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
#
|
||||
# Make sure all shell scripts:
|
||||
# a.) explicitly opt out of locale dependence using "export LC_ALL=C", or
|
||||
# a.) explicitly opt out of locale dependence using
|
||||
# "export LC_ALL=C" or "export LC_ALL=C.UTF-8", or
|
||||
# b.) explicitly opt in to locale dependence using the annotation below.
|
||||
|
||||
export LC_ALL=C
|
||||
@@ -16,7 +17,7 @@ for SHELL_SCRIPT in $(git ls-files -- "*.sh" | grep -vE "src/(secp256k1|univalue
|
||||
continue
|
||||
fi
|
||||
FIRST_NON_COMMENT_LINE=$(grep -vE '^(#.*|)$' "${SHELL_SCRIPT}" | head -1)
|
||||
if [[ ${FIRST_NON_COMMENT_LINE} != "export LC_ALL=C" ]]; then
|
||||
if [[ ${FIRST_NON_COMMENT_LINE} != "export LC_ALL=C" && ${FIRST_NON_COMMENT_LINE} != "export LC_ALL=C.UTF-8" ]]; then
|
||||
echo "Missing \"export LC_ALL=C\" (to avoid locale dependence) as first non-comment non-empty line in ${SHELL_SCRIPT}"
|
||||
EXIT_CODE=1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user