Skip to content

Commit

Permalink
Make presubmit actually fail the build (coredns#2013)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
miekg authored and rancher-sy-bot committed Apr 17, 2019
1 parent db8118f commit 5375590
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .presubmit/filename-hyphen
Expand Up @@ -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
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -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:
Expand Down

0 comments on commit 5375590

Please sign in to comment.