diff --git a/scripts/ci/presubmit-queue-setup.sh b/scripts/ci/presubmit-queue-setup.sh index abbecf2f41..28b1aadec9 100755 --- a/scripts/ci/presubmit-queue-setup.sh +++ b/scripts/ci/presubmit-queue-setup.sh @@ -1,22 +1,21 @@ #!/bin/bash -set -e -x -o pipefail +set -e -o pipefail if [ "$TRAVIS_REPO_SLUG" = "angular/angular" ]; then - if [[ $TRAVIS_BRANCH == "presubmit-"* || $MODE == "build_only" ]]; then + if [[ $TRAVIS_BRANCH == "presubmit-"* ]]; then + + echo '*********************' + echo '** PRESUBMIT SETUP **' + echo '*********************' + git config credential.helper "store --file=.git/credentials" # travis encrypt GITHUB_TOKEN_ANGULAR=??? --repo=angular/angular echo "https://${GITHUB_TOKEN_ANGULAR}:@github.com" > .git/credentials git config user.name "`git --no-pager show -s --format='%cN' HEAD`" git config user.email "`git --no-pager show -s --format='%cE' HEAD`" - if [[ $TRAVIS_BRANCH == "presubmit-"* ]]; then - echo '*********************' - echo '** PRESUBMIT SETUP **' - echo '*********************' - - git remote add upstream https://github.com/angular/angular.git - git fetch upstream master - git rebase upstream/master - fi + git remote add upstream https://github.com/angular/angular.git + git fetch upstream master + git rebase upstream/master fi -fi +fi \ No newline at end of file diff --git a/scripts/ci/publish-build-artifacts.sh b/scripts/ci/publish-build-artifacts.sh index 5560c39863..4ff75c3cfe 100755 --- a/scripts/ci/publish-build-artifacts.sh +++ b/scripts/ci/publish-build-artifacts.sh @@ -14,6 +14,8 @@ REPO_URL="https://github.com/angular/angular.git" SHA=`git rev-parse HEAD` SHORT_SHA=`git rev-parse --short HEAD` COMMIT_MSG=`git log --oneline | head -n1` +COMMITTER_USER_NAME=`git --no-pager show -s --format='%cN' HEAD` +COMMITTER_USER_EMAIL=`git --no-pager show -s --format='%cE' HEAD` function publishRepo { LANG=$1 @@ -47,6 +49,10 @@ function publishRepo { cd $REPO_DIR && \ git add --all && \ git commit -m "${COMMIT_MSG}" && \ + git config credential.helper "store --file=.git/credentials" && \ + echo "https://${GITHUB_TOKEN_ANGULAR}:@github.com" > .git/credentials && \ + git config user.name "${COMMITTER_USER_NAME}" && \ + git config user.email "${COMMITTER_USER_EMAIL}" && \ git push origin $BUILD_BRANCH && \ git tag "2.0.0-build.${SHORT_SHA}.${LANG}" && \ git push origin --tags