File tree Expand file tree Collapse file tree 2 files changed +17
-12
lines changed
Expand file tree Collapse file tree 2 files changed +17
-12
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
2- set -e -x - o pipefail
2+ set -e -o pipefail
33
44if [ " $TRAVIS_REPO_SLUG " = " angular/angular" ]; then
5- if [[ $TRAVIS_BRANCH == " presubmit-" * || $MODE == " build_only" ]]; then
5+ if [[ $TRAVIS_BRANCH == " presubmit-" * ]]; then
6+
7+ echo ' *********************'
8+ echo ' ** PRESUBMIT SETUP **'
9+ echo ' *********************'
10+
611 git config credential.helper " store --file=.git/credentials"
712 # travis encrypt GITHUB_TOKEN_ANGULAR=??? --repo=angular/angular
813 echo " https://${GITHUB_TOKEN_ANGULAR} :@github.com" > .git/credentials
914 git config user.name " ` git --no-pager show -s --format=' %cN' HEAD` "
1015 git config user.email " ` git --no-pager show -s --format=' %cE' HEAD` "
1116
12- if [[ $TRAVIS_BRANCH == " presubmit-" * ]]; then
13- echo ' *********************'
14- echo ' ** PRESUBMIT SETUP **'
15- echo ' *********************'
16-
17- git remote add upstream https://github.com/angular/angular.git
18- git fetch upstream master
19- git rebase upstream/master
20- fi
17+ git remote add upstream https://github.com/angular/angular.git
18+ git fetch upstream master
19+ git rebase upstream/master
2120 fi
22- fi
21+ fi
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ REPO_URL="https://github.com/angular/angular.git"
1414SHA=` git rev-parse HEAD`
1515SHORT_SHA=` git rev-parse --short HEAD`
1616COMMIT_MSG=` git log --oneline | head -n1`
17+ COMMITTER_USER_NAME=` git --no-pager show -s --format=' %cN' HEAD`
18+ COMMITTER_USER_EMAIL=` git --no-pager show -s --format=' %cE' HEAD`
1719
1820function publishRepo {
1921 LANG=$1
@@ -47,6 +49,10 @@ function publishRepo {
4749 cd $REPO_DIR && \
4850 git add --all && \
4951 git commit -m " ${COMMIT_MSG} " && \
52+ git config credential.helper " store --file=.git/credentials" && \
53+ echo " https://${GITHUB_TOKEN_ANGULAR} :@github.com" > .git/credentials && \
54+ git config user.name " ${COMMITTER_USER_NAME} " && \
55+ git config user.email " ${COMMITTER_USER_EMAIL} " && \
5056 git push origin $BUILD_BRANCH && \
5157 git tag " 2.0.0-build.${SHORT_SHA} .${LANG} " && \
5258 git push origin --tags
You can’t perform that action at this time.
0 commit comments