You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ja...@apache.org on 2018/02/23 23:26:42 UTC

[cordova-docs] 01/01: hotfix: do not deploy on PRs

This is an automated email from the ASF dual-hosted git repository.

janpio pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-docs.git

commit 3b939d3ed3ff4a966e8d3bc1128ee572173b16f2
Author: Jan Piotrowski <pi...@gmail.com>
AuthorDate: Sat Feb 24 00:15:26 2018 +0100

    hotfix: do not deploy on PRs
---
 .travis.yml       | 1 +
 buildAndDeploy.sh | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index f378aa6..4a460e3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,5 +7,6 @@ before_install:
 install:
 - npm install
 script:
+  - export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
   - chmod 755 buildAndDeploy.sh
   - travis_wait 30 sleep infinity & ./buildAndDeploy.sh
diff --git a/buildAndDeploy.sh b/buildAndDeploy.sh
index 58d9a41..76358f2 100755
--- a/buildAndDeploy.sh
+++ b/buildAndDeploy.sh
@@ -1,6 +1,7 @@
 #!/bin/sh
-if [ $svn_pass ] && [ $TRAVIS_BRANCH = "master" ]
+if [ $svn_pass ] && [ $BRANCH = "master" ]
 then
+    echo "### build, deploy, test: (branch = $BRANCH)"
     npm run-script build;
     cd ..;
     svn checkout --non-interactive --no-auth-cache --username=$svn_username --password=$svn_pass https://svn.apache.org/repos/asf/cordova/site cordova-website;
@@ -12,5 +13,6 @@ then
     cd ../cordova-docs || return;
     npm test;
 else
+    echo "### test only: (branch = $BRANCH)"
     npm test;
 fi

-- 
To stop receiving notification emails like this one, please contact
janpio@apache.org.

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org