From 70cfe750d5c4e541fe848c0c4242f65045f8a051 Mon Sep 17 00:00:00 2001 From: JAremko Date: Wed, 4 Dec 2019 17:48:24 +0200 Subject: [PATCH] [CI] Fix deploy condition --- .travis.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 263aa6b87..5a54fbfe7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,13 +17,7 @@ env: before_script: - docker pull jare/spacetools:latest script: - - git checkout "${TRAVIS_BRANCH}" -before_deploy: - - > - if ! [ "$BEFORE_DEPLOY_RUN" ]; then - export BEFORE_DEPLOY_RUN=1; - .travisci/pub_prep.sh - fi + - git checkout "${TRAVIS_BRANCH}" && .travisci/pub_prep.sh deploy: - provider: script skip_cleanup: true @@ -32,9 +26,10 @@ deploy: branch: develop # Deploy only if we are in the official repo and # the local revision matches origin's head - condition: $TRAVIS_REPO_SLUG = $SPACEMACS_REPO_SLUG && \ - $(git remote update) && \ - $(git rev-parse '@') = $(git rev-parse '@{u}') + condition: | + $TRAVIS_REPO_SLUG = $SPACEMACS_REPO_SLUG AND \ + $(git remote update) AND \ + $(git rev-parse '@') = $(git rev-parse '@{u}') - provider: script skip_cleanup: true script: ".travisci/pub_html.sh" @@ -42,6 +37,7 @@ deploy: all_branches: true # Deploy only if we are in the official repo and # the local revision matches origin's head - condition: $TRAVIS_REPO_SLUG = $SPACEMACS_REPO_SLUG && \ - $(git remote update) && \ - $(git rev-parse '@') = $(git rev-parse '@{u}') + condition: | + $TRAVIS_REPO_SLUG = $SPACEMACS_REPO_SLUG AND \ + $(git remote update) AND \ + $(git rev-parse '@') = $(git rev-parse '@{u}')