diff --git a/.travis.yml b/.travis.yml index f4a0d4a9f..206ffb9ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,9 +15,17 @@ env: - secure: "M8NF1Uw7VGkLdNmWiUF4T+VOJXwN8KCKVQb45/BWVpGm88Rcfom/9bxRTUme8VYuzIavph32QF+P9KyhX8aj2p2FMItNnxiEySzap5UrLrNiwB6ZxbQglMJj0yMQKASynNBai9KKI7mYlsM5jRpFJ9OSgj7Ko00RIFpO3EpJ+kE=" - BOT_NAME=emacspace - BOT_EMAIL=emacspace@gmail.com + - SPACEMACS_REPO_SLUG="syl20bnr/spacemacs" before_script: -- docker pull jare/spacetools:latest -script: ".travisci/test.sh" + - docker pull jare/spacetools:latest +script: + - | + cd / + rm -rf "${TRAVIS_BUILD_DIR}" + git clone "https://github.com/${SPACEMACS_REPO_SLUG}" \ + -b "${TRAVIS_BRANCH}" \ + "${TRAVIS_BUILD_DIR}" + cd "${TRAVIS_BUILD_DIR}" before_deploy: - > if ! [ "$BEFORE_DEPLOY_RUN" ]; then @@ -29,11 +37,11 @@ deploy: skip_cleanup: true script: ".travisci/pub_org.sh" on: - all_branches: true - condition: $TRAVIS_REPO_SLUG = "syl20bnr/spacemacs" + branch: develop + condition: $TRAVIS_REPO_SLUG = $SPACEMACS_REPO_SLUG - provider: script skip_cleanup: true script: ".travisci/pub_html.sh" on: all_branches: true - condition: $TRAVIS_REPO_SLUG = "syl20bnr/spacemacs" + condition: $TRAVIS_REPO_SLUG = $SPACEMACS_REPO_SLUG diff --git a/.travisci/pub_html.sh b/.travisci/pub_html.sh index 5494c6dde..3bf3a6a6e 100755 --- a/.travisci/pub_html.sh +++ b/.travisci/pub_html.sh @@ -79,7 +79,7 @@ if [ $? -ne 0 ]; then fi fold_end "PUSHING_CHANGES_TO_${BOT_NAME}/${PUBLISH}" -fold_start "OPENING_PR_TO_syl20bnr/${PUBLISH}.git" +fold_start "OPENING_PR_TO_syl20bnr/${PUBLISH}" echo "Documentation updates (autoexport)" > msg echo >> msg echo "beep beep boop... Beep?" >> msg @@ -87,4 +87,4 @@ echo "beep beep boop... Beep?" >> msg if [ $? -ne 0 ]; then echo "Seems like PR already exists (not a problem)" fi -fold_end "OPENING_PR_TO_syl20bnr/${PUBLISH}.git" +fold_end "OPENING_PR_TO_syl20bnr/${PUBLISH}" diff --git a/.travisci/pub_org.sh b/.travisci/pub_org.sh index 8a0586a0b..f15183a6e 100755 --- a/.travisci/pub_org.sh +++ b/.travisci/pub_org.sh @@ -40,7 +40,7 @@ git config --global hub.protocol https export GITHUB_TOKEN=$BOT_TK fold_start "CLONING_TARGET_REPOSITORY" -target_URL="https://github.com/syl20bnr/${PUBLISH}.git" +target_URL="https://github.com/${SPACEMACS_REPO_SLUG}.git" git clone "${target_URL}" -b "${TRAVIS_BRANCH}" "/tmp/${PUBLISH}" if [ $? -ne 0 ]; then echo "Failed to clone \"${target_URL}\"" @@ -83,7 +83,7 @@ if [ $? -ne 0 ]; then fi fold_end "PUSHING_CHANGES_TO_${BOT_NAME}/${PUBLISH}" -fold_start "OPENING_PR_TO_syl20bnr/${PUBLISH}.git" +fold_start "OPENING_PR_TO_SPACEMACS_REPO" echo "[bot] Documentation formatting" > msg echo >> msg echo "Merge with care - I'm just a stupid bot. Beep boop." >> msg @@ -91,4 +91,4 @@ echo "Merge with care - I'm just a stupid bot. Beep boop." >> msg if [ $? -ne 0 ]; then echo "Seems like PR already exists (not a problem)" fi -fold_end "OPENING_PR_TO_syl20bnr/${PUBLISH}.git" +fold_end "OPENING_PR_TO_SPACEMACS_REPO" diff --git a/.travisci/test.sh b/.travisci/test.sh deleted file mode 100755 index 7b3b92467..000000000 --- a/.travisci/test.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -## Test script for Travis CI integration -## -## Copyright (c) 2012-2014 Sylvain Benner -## Copyright (c) 2014-2018 Sylvain Benner & Contributors -## -## Author: Eugene Yaremenko -## URL: https://github.com/syl20bnr/spacemacs -## -## This file is not part of GNU Emacs. -## -## License: GPLv3