From 259973f0cc3d10107d8c2e6084b9f8caee67eea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 29 Jun 2018 12:55:01 +0100 Subject: [PATCH] travis: correct python version --- .travis.yml | 1 + ci/deploy.sh | 26 +++++++++++--------------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index e322ed0c6..de88e24d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,5 +5,6 @@ before_install: - eval "$(ssh-agent -s)" - ssh-add deploy_key - rm deploy_key + - source ~/virtualenv/python3.6/bin/activate script: - bash ci/deploy.sh diff --git a/ci/deploy.sh b/ci/deploy.sh index fec10ae05..30aad5375 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -3,9 +3,7 @@ set -eux -o pipefail # Exit with nonzero exit code if anything fails # Pull requests and commits to other branches shouldn't try to deploy, just build to verify -if [[ "$TRAVIS_PULL_REQUEST" != "false" ]] || \ - [[ "$TRAVIS_BRANCH" != master ]] && \ - [[ "$TRAVIS_BRANCH" != "$(cat .version)" ]]; then +if [[ "$TRAVIS_PULL_REQUEST" != "false" ]] || [[ "$TRAVIS_BRANCH" != master ]]; then echo "Skipping deploy; just doing a build." python ./nur/update.py nix-build @@ -15,17 +13,15 @@ fi python ./nur/update.py nix-build -if [ "$TRAVIS_BRANCH" = master ]; then - git config user.name "Travis CI" - git config user.email "$COMMIT_AUTHOR_EMAIL" - - if [ -z "$(git diff --exit-code)" ]; then - echo "No changes to the output on this push; exiting." - exit 0 - fi - - git add --all repos.json* +git config user.name "Travis CI" +git config user.email "$COMMIT_AUTHOR_EMAIL" - git commit -m "automatic update" - git push origin master +if [ -z "$(git diff --exit-code)" ]; then + echo "No changes to the output on this push; exiting." + exit 0 fi + +git add --all repos.json* + +git commit -m "automatic update" +git push origin master