Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

deploy.sh 566 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. set -o errexit -o nounset
  3. if [ "$TRAVIS_BRANCH" != "master" ]
  4. then
  5. echo "This commit was made against $TRAVIS_BRANCH and not master! No deploy!"
  6. exit 0
  7. fi
  8. rev=$(git rev-parse --short HEAD)
  9. mkdir deploy
  10. cd deploy
  11. git init
  12. git config --global user.name $GH_USER
  13. git config --global user.email $GH_EMAIL
  14. git remote add upstream "https://$GH_TOKEN@github.com/toddmotto/public-apis.git"
  15. git fetch upstream
  16. git reset upstream/master
  17. mv ../../json .
  18. git add json/
  19. git commit -m "rebuild JSON at ${rev}" -m "[ci skip]"
  20. git push upstream HEAD:master