Permalink
Browse files

Set FAIL_ON_WARNINGS in .travis.sh

When building pull request
  • Loading branch information...
1 parent a540f91 commit 1f50f91bc363038aff1f1a6425a9be09e401ee9f @ledvinap ledvinap committed Jun 2, 2016
Showing with 7 additions and 10 deletions.
  1. +7 −2 .travis.sh
  2. +0 −8 Makefile
View
@@ -21,9 +21,14 @@ CURL_PUB_BASEOPTS=(
"--form" "github_repo=${TRAVIS_REPO_SLUG}"
"--form" "build_name=${BUILDNAME}" )
+# pass FAIL_ON_WARNINGS when building Pull Request
+if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
+ OPTIONS="FAIL_ON_WARNINGS"
+fi
+
# A hacky way of running the unit tests at the same time as the normal builds.
if [ $RUNTESTS ] ; then
- cd ./src/test && make test
+ cd ./src/test && make test OPTIONS="$OPTIONS"
# A hacky way of building the docs at the same time as the normal builds.
elif [ $PUBLISHDOCS ] ; then
@@ -64,6 +69,6 @@ else
curl -k "${CURL_BASEOPTS[@]}" "${CURL_PUB_BASEOPTS[@]}" --form "file=@${TARGET_FILE}" ${PUBLISH_URL} || true
exit 0;
else
- make -j2
+ make -j2 OPTIONS="$OPTIONS"
fi
fi
View
@@ -30,14 +30,6 @@ SERIAL_DEVICE ?= $(firstword $(wildcard /dev/ttyUSB*) no-port-found)
# Flash size (KB). Some low-end chips actually have more flash than advertised, use this to override.
FLASH_SIZE ?=
-
-# Detect travis Pull Request build
-ifeq ($(TRAVIS),true) # travis build
-ifneq ($(TRAVIS_PULL_REQUEST), false) # building pull request
-OPTIONS += FAIL_ON_WARNINGS # do not allow pull requests with warnings
-endif
-endif
-
###############################################################################
# Things that need to be maintained as the source changes
#

0 comments on commit 1f50f91

Please sign in to comment.