Travis update

This commit is contained in:
Angelos Chalaris
2017-12-30 15:23:13 +02:00
parent 4ee055db24
commit ef2a3ad524

View File

@ -4,9 +4,8 @@ setup_git() {
} }
commit_website_files() { commit_website_files() {
echo "$TRAVIS_EVENT_TYPE $TRAVIS_BRANCH" if [ $TRAVIS_EVENT_TYPE != "pull_request" ]; then
if [[ $(( $TRAVIS_EVENT_TYPE )) != 'pull_request' ]]; then if [ $TRAVIS_BRANCH == "master" ]; then
if [[ $(( $TRAVIS_BRANCH )) == 'master' ]]; then
echo "Commiting to master branch..." echo "Commiting to master branch..."
git checkout master git checkout master
git add * git add *
@ -16,8 +15,8 @@ commit_website_files() {
} }
upload_files() { upload_files() {
if [[ $(( $TRAVIS_EVENT_TYPE )) != 'pull_request' ]]; then if [ $TRAVIS_EVENT_TYPE != "pull_request" ]; then
if [[ $(( $TRAVIS_BRANCH )) == 'master' ]]; then if [ $TRAVIS_BRANCH == "master" ]; then
echo "Pushing to master branch..." echo "Pushing to master branch..."
git push --force --quiet "https://${GH_TOKEN}@github.com/Chalarangelo/30-seconds-of-code.git" master > /dev/null 2>&1 git push --force --quiet "https://${GH_TOKEN}@github.com/Chalarangelo/30-seconds-of-code.git" master > /dev/null 2>&1
fi fi