From 9e45bc9b8bfb15a4154cc87efc00e7116662836c Mon Sep 17 00:00:00 2001 From: probonopd Date: Sun, 18 Mar 2018 15:33:29 +0100 Subject: [PATCH] Update worker.sh --- code/worker.sh | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/code/worker.sh b/code/worker.sh index 52968cb5..e8a59df0 100644 --- a/code/worker.sh +++ b/code/worker.sh @@ -402,6 +402,8 @@ sudo chmod a+x appstreamcli-x86_64.AppImage rm database/$INPUTBASENAME/package.yaml fi echo "---" >> apps/$INPUTBASENAME.md + ls -lh apps/$INPUTBASENAME.md || exit 1 + ls -lh database/$INPUTBASENAME/ || exit 1 ##### done # TODO: Convert the "database files" into whatever output formats we need to support @@ -416,20 +418,23 @@ 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 -if [ x"$TRAVIS_PULL_REQUEST" == x"false" ] ; then - git pull # To prevent from: error: failed to push some refs to 'https://[secure]@github.com/AppImage/AppImageHub.git' - git config --global user.email "travis@travis-ci.org" - git config --global user.name "Travis CI" - set -x - ( cd database/ ; git diff ; git add . ; git rm *.yaml || true ) # Recursively add everything in this directory - ( cd apps/ ; git diff ; git add . || true ) # Recursively add everything in this directory - git commit -F- < /dev/null 2>&1 +set +x +git remote add deploy https://${GITHUB_TOKEN}@github.com/$TRAVIS_REPO_SLUG.git > /dev/null 2>&1 +if [ x"$TRAVIS_PULL_REQUEST" == x"false" ] ; then set -x git push --set-upstream deploy set +x +else + echo "Not runing 'git push --set-upstream deploy' because this build does NOT have TRAVIS_PULL_REQUEST=false" fi