This is an automated email from the ASF dual-hosted git repository. francischuang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/calcite-avatica-go.git
commit b5d66e43d4064ec8497dc4e0d193afa7d2ccfb53 Author: Francis Chuang <[email protected]> AuthorDate: Mon Oct 10 10:53:51 2022 +1100 [CALCITE-5325] Display errors when failing release guidelines check using docker release script --- docker.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docker.sh b/docker.sh index 3539080..2101441 100755 --- a/docker.sh +++ b/docker.sh @@ -163,6 +163,8 @@ select_gpg_key(){ check_release_guidelines(){ # Exclude files without the Apache license header + missingHeaders=0 + for i in $(git ls-files); do case "$i" in # The following are excluded from the license header check @@ -176,7 +178,9 @@ check_release_guidelines(){ # Binaries (test-fixtures/calcite.png);; - (*) grep -q "Licensed to the Apache Software Foundation" $i || echo "$i has no header";; + (*) if ! grep -q "Licensed to the Apache Software Foundation" $i; then + echo "$i has no header" && ((missingHeaders=missingHeaders+1)) + fi;; esac done @@ -185,6 +189,11 @@ check_release_guidelines(){ echo "Ending copyright year in NOTICE is not $(date +%Y)" exit 1 fi + + if [[ $missingHeaders -gt 0 ]]; then + echo "Some files are missing the Apache license header" + exit 1 + fi } check_if_tag_exists(){
