From 18baa79a40211c443a83034be19567accd83806f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 29 Jun 2018 13:06:01 +0100 Subject: [PATCH] travis: only push repos in cron jobs --- ci/deploy.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/ci/deploy.sh b/ci/deploy.sh index 30aad5375..cb940f555 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -2,19 +2,17 @@ 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 ]]; then - echo "Skipping deploy; just doing a build." - python ./nur/update.py - nix-build - exit 0 -fi - python ./nur/update.py nix-build +# Pull requests and commits to other branches shouldn't try to deploy, just build to verify +if [[ "$TRAVIS_EVENT_TYPE" != "cron" ]]; then + echo "Skipping deploy; just doing a build." + exit 0 +fi + git config user.name "Travis CI" -git config user.email "$COMMIT_AUTHOR_EMAIL" +git config user.email "travis@travis.org" if [ -z "$(git diff --exit-code)" ]; then echo "No changes to the output on this push; exiting."