| OLD | NEW |
| (Empty) |
| 1 #!/bin/bash | |
| 2 | |
| 3 # If we're on the presubmit branch, the stable Dart release, and all unit | |
| 4 # tests pass, merge the presubmit branch into master and push it. | |
| 5 | |
| 6 | |
| 7 CHANNEL=`echo $JOB | cut -f 2 -d -` | |
| 8 SHA=`git rev-parse HEAD` | |
| 9 | |
| 10 echo Current channel is: $CHANNEL | |
| 11 echo Current branch is: $TRAVIS_BRANCH | |
| 12 echo Test result is: $TRAVIS_TEST_RESULT | |
| 13 | |
| 14 if [ "$CHANNEL" = "stable" ] && [ "$TRAVIS_REPO_SLUG" = "angular/angular.dart" ]
; then | |
| 15 if [ $TRAVIS_TEST_RESULT -eq 0 ] && [[ $TRAVIS_BRANCH == "presubmit-"* ]]; the
n | |
| 16 git config credential.helper "store --file=.git/credentials" | |
| 17 # travis encrypt GITHUB_TOKEN_ANGULAR_ORG=??? --repo=angular/angular.dart | |
| 18 echo "https://${GITHUB_TOKEN_ANGULAR_ORG}:@github.com" > .git/credentials | |
| 19 git config user.name "travis@travis-ci.org" | |
| 20 | |
| 21 echo "Pushing HEAD to master..." | |
| 22 git remote add upstream https://github.com/angular/angular.dart.git | |
| 23 git stash | |
| 24 git fetch upstream master | |
| 25 git rebase upstream/master | |
| 26 if git push upstream HEAD:master; then | |
| 27 echo "$TRAVIS_BRANCH has been merged into master, deleting..." | |
| 28 git push upstream :"$TRAVIS_BRANCH" | |
| 29 fi | |
| 30 fi | |
| 31 fi | |
| OLD | NEW |