aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2018-07-30 07:41:52 +0100
committerGravatar Yong Tang <yong.tang.github@outlook.com> 2018-07-29 23:41:52 -0700
commit6e1c02c4ac7d806af5e91dbe42c43a1e817b6b70 (patch)
treecda74b89a7a0512857ed774b70ebf3c629159444
parent54ec78c1ba918b98ac9b9c5b1334c9d170502119 (diff)
downloadcoredns-6e1c02c4ac7d806af5e91dbe42c43a1e817b6b70.tar.gz
coredns-6e1c02c4ac7d806af5e91dbe42c43a1e817b6b70.tar.zst
coredns-6e1c02c4ac7d806af5e91dbe42c43a1e817b6b70.zip
Make presubmit actually fail the build (#2013)
The exit code wasn't properly acted upon in the makefile. Make filename-hyphen actually return an non-zero exit code. Signed-off-by: Miek Gieben <miek@miek.nl>
-rwxr-xr-x.presubmit/filename-hyphen1
-rw-r--r--Makefile2
2 files changed, 2 insertions, 1 deletions
diff --git a/.presubmit/filename-hyphen b/.presubmit/filename-hyphen
index 927ac1ff2..e08f2b16e 100755
--- a/.presubmit/filename-hyphen
+++ b/.presubmit/filename-hyphen
@@ -5,5 +5,6 @@ echo "** presubmit/$(basename $0)"
for dir in "$@"; do
if find $dir | grep '-'; then
echo "** presubmit/$(basename $0): please use an underscore in filenames instead of a hyphen"
+ exit 1
fi
done
diff --git a/Makefile b/Makefile
index b66a6c9f4..4ccb287b9 100644
--- a/Makefile
+++ b/Makefile
@@ -81,7 +81,7 @@ pb:
# Presubmit runs all scripts in .presubmit; any non 0 exit code will fail the build.
.PHONY: presubmit
presubmit:
- @for pre in $(MAKEPWD)/.presubmit/* ; do "$$pre" $(PRESUBMIT); done
+ @for pre in $(MAKEPWD)/.presubmit/* ; do "$$pre" $(PRESUBMIT) || exit 1 ; done
.PHONY: clean
clean: