- linux
- amd64
script:
- - test -z $(git diff)
+ - git_diff=$(git diff)
+ - if test -n "${git_diff}"; then printf '%s\n\ngit diff should be empty here under all circumstances. CI broken?\n' "${git_diff}"; exit 1; fi
- ./tools/print-generated-files.sh -a
- - test -z $(git diff)
+ - git_diff=$(git diff)
+ - if test -n "${git_diff}"; then printf '%s\n\n.gitattributes are missing a generated file. Please run "./tools/print-generated-files.sh -a" and commit the resulting change to fix them.\n' "${git_diff}"; exit 1; fi
# Parse parameters.
while test ${#} -gt 0; do
case "${1}" in
- # [-d|--debug] enable debug mode, showing every executed command
+ # [-d|--debug] enable debug mode, showing every executed command
'-d'|'--debug') set -vx ;;
- # [-h|--help] print usage (this text).
+ # [-h|--help] print usage (this text)
'-h'|'--help') print_usage ;;
# [-a|--amend] amend .gitattributes