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 54cd84fe4a7d488b45e5a8765251685538b1da8b Author: Francis Chuang <[email protected]> AuthorDate: Mon Oct 10 10:38:07 2022 +1100 [CALCITE-5325] Display errors when failing release guidelines check using docker release script --- docker.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docker.sh b/docker.sh index 3539080..ff781a7 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,7 @@ check_release_guidelines(){ # Binaries (test-fixtures/calcite.png);; - (*) grep -q "Licensed to the Apache Software Foundation" $i || echo "$i has no header";; + (*) grep -q "Licensed to the Apache Software Foundation" $i || echo "$i has no header" && ((missingHeaders=missingHeaders+1));; esac done @@ -185,6 +187,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(){
