Skip to content
This repository has been archived by the owner on May 7, 2023. It is now read-only.

Commit

Permalink
push.sh update
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitanwar committed Feb 14, 2018
1 parent d580748 commit 25db90d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .travis/push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@ commit_website_files() {
if [ $TRAVIS_EVENT_TYPE != "pull_request" ]; then
if [ $TRAVIS_BRANCH == "master" ]; then
echo "Committing to master branch..."
git checkout master
git add *
git add -A
echo "All files added"
git status
if [ $TRAVIS_EVENT_TYPE == "cron" ]; then
git commit --message "Travis build: $TRAVIS_BUILD_NUMBER [cron]"
elif [ $TRAVIS_EVENT_TYPE == "api" ]; then
git commit --message "Travis build: $TRAVIS_BUILD_NUMBER [custom]"
else
git commit --message "Travis build: $TRAVIS_BUILD_NUMBER"
fi
echo "Files commited"
git status
fi
fi
}
Expand All @@ -25,7 +28,9 @@ upload_files() {
if [ $TRAVIS_EVENT_TYPE != "pull_request" ]; then
if [ $TRAVIS_BRANCH == "master" ]; then
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 "https://${GH_TOKEN}@github.com/Chalarangelo/30-seconds-of-code.git" master > /dev/null 2>&1
echo "Pushing done"
git status
fi
fi
}
Expand Down

0 comments on commit 25db90d

Please sign in to comment.