diff --git a/code/worker.sh b/code/worker.sh index 0f870601..321ee42a 100644 --- a/code/worker.sh +++ b/code/worker.sh @@ -3,6 +3,10 @@ URL=$(cat $1 | head -n 1) echo $URL +if [ "$TRAVIS_PULL_REQUEST" == "false" ] ; then + git checkout master +fi + INPUTBASENAME=$(basename $1) # Check if $URL starts with "http", otherwise exit @@ -209,15 +213,17 @@ echo "===========================================" # If this is not a PR, then git add the "database file" and git commit with "[ci skip]" and git push # https://gist.github.com/willprice/e07efd73fb7f13f917ea -git config --global user.email "travis@travis-ci.org" -git config --global user.name "Travis CI" -( cd database/ ; git add . || true ) # Recursively add everything in this directory -git commit -F- < /dev/null 2>&1 -git push --set-upstream deploy +if [ "$TRAVIS_PULL_REQUEST" == "false" ] ; then + git config --global user.email "travis@travis-ci.org" + git config --global user.name "Travis CI" + ( cd database/ ; git add . || true ) # Recursively add everything in this directory + git commit -F- < /dev/null 2>&1 + git push --set-upstream deploy +fi # TODO: If this is not a PR, then convert the "database files" into whatever output formats we need to support # e.g., OCS for knsrc/Discover