aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml15
-rwxr-xr-xbuild-aux/travis-deploy.sh15
2 files changed, 18 insertions, 12 deletions
diff --git a/.travis.yml b/.travis.yml
index cd2d134..0ea174c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -35,15 +35,6 @@ install: gem install ronn
before_script: ./autogen.sh
-script: ./build-aux/travis-build.sh
-
-deploy:
- provider: script
- script: ./build-aux/travis-deploy.sh
- skip_cleanup: true
- on:
- repo: blogc/blogc
- branch: master
- condition:
- - $CC = gcc
- - $TARGET != valgrind
+script:
+ - ./build-aux/travis-build.sh
+ - ./build-aux/travis-deploy.sh
diff --git a/build-aux/travis-deploy.sh b/build-aux/travis-deploy.sh
index 71469ff..0ef28bf 100755
--- a/build-aux/travis-deploy.sh
+++ b/build-aux/travis-deploy.sh
@@ -2,6 +2,21 @@
set -e
+if [[ "x${TRAVIS_PULL_REQUEST}" != "xfalse" ]]; then
+ echo "This is a pull request. skipping deploy ..."
+ exit 0
+fi
+
+if [[ "x${TRAVIS_BRANCH}" != "xmaster" ]] && [[ "x${TRAVIS_TAG}" != xv* ]]; then
+ echo "This isn't master branch nor a valid tag. skipping deploy ..."
+ exit 0
+fi
+
+if [[ "x${CC}" != "xgcc" ]] || [[ "x${TARGET}" = "xvalgrind" ]]; then
+ echo "Invalid target for deploy. skipping ..."
+ exit 0
+fi
+
if [[ ! -d build ]]; then
echo "Build directory not found."
exit 1