Commit 6e1c02c4 authored by Miek Gieben's avatar Miek Gieben Committed by Yong Tang

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: default avatarMiek Gieben <miek@miek.nl>
parent 54ec78c1
...@@ -5,5 +5,6 @@ echo "** presubmit/$(basename $0)" ...@@ -5,5 +5,6 @@ echo "** presubmit/$(basename $0)"
for dir in "$@"; do for dir in "$@"; do
if find $dir | grep '-'; then if find $dir | grep '-'; then
echo "** presubmit/$(basename $0): please use an underscore in filenames instead of a hyphen" echo "** presubmit/$(basename $0): please use an underscore in filenames instead of a hyphen"
exit 1
fi fi
done done
...@@ -81,7 +81,7 @@ pb: ...@@ -81,7 +81,7 @@ pb:
# Presubmit runs all scripts in .presubmit; any non 0 exit code will fail the build. # Presubmit runs all scripts in .presubmit; any non 0 exit code will fail the build.
.PHONY: presubmit .PHONY: presubmit
presubmit: presubmit:
@for pre in $(MAKEPWD)/.presubmit/* ; do "$$pre" $(PRESUBMIT); done @for pre in $(MAKEPWD)/.presubmit/* ; do "$$pre" $(PRESUBMIT) || exit 1 ; done
.PHONY: clean .PHONY: clean
clean: clean:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment