Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: third_party/pkg/angular/scripts/travis/presubmit.sh

Issue 257423008: Update all Angular libs (run update_all.sh). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/pkg/angular/scripts/travis/presubmit.sh
diff --git a/third_party/pkg/angular/scripts/travis/presubmit.sh b/third_party/pkg/angular/scripts/travis/presubmit.sh
new file mode 100755
index 0000000000000000000000000000000000000000..1c1794a5eec90fecc4ea4ca33d1f5fd432630a6a
--- /dev/null
+++ b/third_party/pkg/angular/scripts/travis/presubmit.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+# If we're on the presubmit branch, the stable Dart release, and all unit
+# tests pass, merge the presubmit branch into master and push it.
+
+
+CHANNEL=`echo $JOB | cut -f 2 -d -`
+SHA=`git rev-parse HEAD`
+
+echo Current channel is: $CHANNEL
+echo Current branch is: $TRAVIS_BRANCH
+echo Test result is: $TRAVIS_TEST_RESULT
+
+if [ "$CHANNEL" = "stable" ] && [ "$TRAVIS_REPO_SLUG" = "angular/angular.dart" ]; then
+ if [ $TRAVIS_TEST_RESULT -eq 0 ] && [[ $TRAVIS_BRANCH == "presubmit-"* ]]; then
+ git config credential.helper "store --file=.git/credentials"
+ # travis encrypt GITHUB_TOKEN_ANGULAR_ORG=??? --repo=angular/angular.dart
+ echo "https://${GITHUB_TOKEN_ANGULAR_ORG}:@github.com" > .git/credentials
+ git config user.name "travis@travis-ci.org"
+
+ echo "Pushing HEAD to master..."
+ git remote add upstream https://github.com/angular/angular.dart.git
+ git stash
+ git fetch upstream master
+ git rebase upstream/master
+ if git push upstream HEAD:master; then
+ echo "$TRAVIS_BRANCH has been merged into master, deleting..."
+ git push upstream :"$TRAVIS_BRANCH"
+ fi
+ fi
+fi
« no previous file with comments | « third_party/pkg/angular/scripts/travis/install.sh ('k') | third_party/pkg/angular/scripts/travis/publish-docs.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698