diff options
-rw-r--r-- | .gitlab-ci.yml | 6 | ||||
-rwxr-xr-x | tools/print-generated-files.sh | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a7359ccbaa..6092b176d1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -142,6 +142,8 @@ missing-git-attribute: - 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 diff --git a/tools/print-generated-files.sh b/tools/print-generated-files.sh index db85126836..ce219c3029 100755 --- a/tools/print-generated-files.sh +++ b/tools/print-generated-files.sh @@ -56,10 +56,10 @@ 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 |