From 169d794bb91de7bc8a61e6b9a373688c32935861 Mon Sep 17 00:00:00 2001 From: Surabhi Sharma Date: Wed, 26 Jul 2017 20:11:32 +0530 Subject: [PATCH] Add travis script to auto-fetch develop from GitHub after a PR is merged --- .travis.yml | 5 +++++ travis.sh | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 travis.sh diff --git a/.travis.yml b/.travis.yml index 358353f2..5800f31e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,3 +19,8 @@ deploy: provider: heroku api_key: secure: auBdU0dKRsULQaMsTFnt0Gal/YSJSQFgSz1bONqYkm+TFnSlC2W3w1BNUFAqyrUceWT90aieBRau4G9yFNUE6/MGFaxH7a2B1CYraXE2sHXQQ5+vts2mIyeMNnAWiQTiqpMjBvIVKkfLzgOdYgTgNwIZ4b6bSRqd9upCAZAbhoipFNpChSdPtKS6iAr3V7PXlHl1GOyPqURVmhi5r3snHAWk70tp5RZMEX/jSvXnQDFK+YlNyKS4LwpyS1B9UB1C+wLx5MCuijFi6l02ETD21LN3JQG800MKukG3/6Zhec2JbCzlRMMphHJk0fX2bshIpLAEuZzEd0dvOYVTJ5maMuCUijq07PTTIuTOLKCcoZFuKm+sypF9jv4lEVfQUp+dEchrfQyixJNgbuEP6qbbo00i4xzMxPMrj/l0cPI0LSSgupLS4CrrmwiVvqTx30Cr0MXY+sU2uGMNOABHVce6S7QoNv0jst9RlDd2Ab+Q+akD7/ZABGFpOE8AIADP4y9gZcoj92nn8uOpRnISgYGjdBYM9iqksTxiWqwgGWKKWXhr5Gjvc1Ql6y4LBHvtKNDHliMwGs7N9f5PLpWitY50q7NMzwuMH8mO95+WXQ1MFxFORp04p+rscTx7jr8Q+uF/SWZ20BmmmAYIyqMIvREEHKMK/s5xlT7QvrQV/ZENMKU= +after_success: + - bash travis.sh +env: + global: + secure: GaWCIjifcrDR1/bzRo5X5tcZXKfiulC8LcxXmzAD9nL83VNmuXZ5XE9j5Pt5uNtT9J6xDHF9OMnvknJlAKKp6ZmWGU8wQmO4nc/GZFOhZP4jv8v/v0kFFhvDN9YzuBGIl+daafCZ2Ve3wANnxb92qsHC5TsIBRcf/1QGme25tfHqaAGxL165EoecRmbFyFC2biYCj9EyYNxx3gXNB2EPL8M0aLDtXabDHWs3i38G5jZakgYoC0DqGXRubbzl6uJCylawJYoAkk09U8obs6Zv+Z/HkgbR0AjeLVuXd3cwbZkh3uXBw2llFRb/J3T30rfBPgtXDEiI/Qu+uhQSSjf9C4jWu2sVrSizk/6d2wZGlFMIW/549Bi3tSgyhb8PCllTscPGgVaSNAeoBRd3QPj6BVS5u8+DN+hpjGp3sb2IOaWL5NSDd+o8QKQrhSxe5PQDQtmIXZ9vd1Mi9WXCLJiUWSs4R3U4qzEn4b/TiIWKLUqfJg1o++xwZRuUr6GCO3VDcdGcSQOfpr4NCwsZ1QpLY1cbuQGGDzmeviMXy+l0r6wW7knqWmnQBXLcQCqTh0niFok9x4M7Nk3M9Z7vIqa3/bZc7cWUJAk4RFZ3AiO0B1Xw0wpn9cD3tLRasm4SR3HRo5sD4gMvnJY+Fsw3te3jwx7fG/C2hS28jqB9lZJzdl8= diff --git a/travis.sh b/travis.sh new file mode 100644 index 00000000..f6e68898 --- /dev/null +++ b/travis.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +# set -o errexit -o nounset + +# if [ "$TRAVIS_BRANCH" != "master" ] +# then +# echo "This commit was made against the $TRAVIS_BRANCH and not the master! No deploy!" +# exit 0 +# fi + +# rev=$(git rev-parse --short HEAD) + +# cd stage/_book + +# git init +git config user.name "Surabhi Sharma" +git config user.email "surabhisharma.226005@gmail.com" + +#git remote add upstream "https://$GH_TOKEN@github.com/rust-lang/rust-by-example.git" +git remote add upstream "https://github.com/surabhi226005/express-mongoose-es6-rest-api.git" +git fetch +git branch --track develop origin/develop +git checkout develop + +#git fetch upstream +#git reset upstream/gh-pages + +#echo "rustbyexample.com" > CNAME + +# touch . + +# git add -A . +# git commit -m "rebuild pages at ${rev}" +# git push -q upstream HEAD:gh-pages