Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 53aeb4a

Browse files
committed
fix(presubmit): Set new token; correct env variable name
1 parent 2c47952 commit 53aeb4a

File tree

3 files changed

+34
-36
lines changed

3 files changed

+34
-36
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313
TESTS=dart2js
1414
global:
1515
- CHROME_BIN=/usr/bin/google-chrome
16-
- secure: NJt0LRmY2HoMw4QuTc+8MhDfSCTTuXe0kE7pC1flbhQOi/g6sdVX57b/4OZzBXRKG1oq/URX4FMeVgSuFQvTaEad0qsTPoGji/Mmk61LRtE/Mbo/H7v5P2tyGPPJ5S25C/xFo42cKDyzFU8Uv+5W2Htijsa3xt4VfAWcDmZJjuA=
16+
- secure: "ZSUCLuDjvKEFmgjAd3GpUNCNkdjE66dEIiBfW+EfN0dv2+QHx/MHL4hRyKk2qbGjCr/suR9JWgmNE+Yu1A4fwzcYN52ehgyoLUCTL9YDk+XkFdFWpnjJ8364TDcDuJA0oxwcqJ9E3XUPv6sq1mbcX6DlkPKco7ZT8TLtGmd0nGA="
1717
before_install:
1818
- export DISPLAY=:99.0
1919
- ./scripts/travis/install.sh

scripts/travis/presubmit.sh

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,14 @@ echo Current branch is: $TRAVIS_BRANCH
1212
echo Test result is: $TRAVIS_TEST_RESULT
1313

1414
if [ "$CHANNEL" = "stable" ] && [ "$TRAVIS_REPO_SLUG" = "angular/angular.dart" ]; then
15-
16-
if [ $TRAVIS_TEST_RESULT -eq 0 ] && [[ $TRAVIS_BRANCH == "presubmit-"* ]]; then
17-
18-
git config credential.helper "store --file=.git/credentials"
19-
echo "https://${GITHUB_TOKEN_ANGULARDART}:@github.com" > .git/credentials
20-
git config user.name "travis@travis-ci.org"
21-
22-
echo "Pushing HEAD to master..."
23-
git remote add upstream https://github.com/angular/angular.dart.git
24-
git push upstream HEAD:master
25-
fi
15+
if [ $TRAVIS_TEST_RESULT -eq 0 ] && [[ $TRAVIS_BRANCH == "presubmit-"* ]]; then
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 push upstream HEAD:master
24+
fi
2625
fi

scripts/travis/publish-docs.sh

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,29 @@ echo Current branch is: $TRAVIS_BRANCH
88
echo Test result is: $TRAVIS_TEST_RESULT
99

1010
if [ "$CHANNEL" = "stable" ] && [ "$TRAVIS_REPO_SLUG" = "angular/angular.dart" ]; then
11-
12-
if [ $TRAVIS_TEST_RESULT -eq 0 ] && [ "$TRAVIS_BRANCH" = "master" ]; then
13-
14-
echo "Gettting current docs from docs.angulardart.org repo on Github"
15-
rm -Rf docs.angulardart.org
16-
git clone https://github.com/angular/docs.angulardart.org.git
17-
18-
echo "Removing old stable docs..."
19-
rm -rf docs.angulardart.org/docs
20-
21-
echo "Copying new docs into stable folder..."
22-
rsync -a dartdoc-viewer/client/build/web/* docs.angulardart.org/
23-
cd docs.angulardart.org/
24-
25-
#.git folder needs to be in the *project* root
26-
git config credential.helper "store --file=.git/credentials"
27-
echo "https://${GITHUB_TOKEN_DOCS_ANGULARDART_ORG}:@github.com" > .git/credentials
28-
git config user.name "travis@travis-ci.org"
29-
30-
echo "Adding files..."
31-
git add .
32-
git commit -m "Automated push of generated docs from SHA: https://github.com/angular/angular.dart/commit/$SHA"
33-
git push
34-
fi
11+
if [ $TRAVIS_TEST_RESULT -eq 0 ] && [ "$TRAVIS_BRANCH" = "master" ]; then
12+
echo "Gettting current docs from docs.angulardart.org repo on Github"
13+
rm -Rf docs.angulardart.org
14+
git clone https://github.com/angular/docs.angulardart.org.git
15+
16+
echo "Removing old stable docs..."
17+
rm -rf docs.angulardart.org/docs
18+
19+
echo "Copying new docs into stable folder..."
20+
rsync -a dartdoc-viewer/client/build/web/* docs.angulardart.org/
21+
cd docs.angulardart.org/
22+
23+
#.git folder needs to be in the *project* root
24+
git config credential.helper "store --file=.git/credentials"
25+
# travis encrypt GITHUB_TOKEN_ANGULAR_ORG=??? --repo=angular/angular.dart
26+
echo "https://${GITHUB_TOKEN_ANGULAR_ORG}:@github.com" > .git/credentials
27+
git config user.name "travis@travis-ci.org"
28+
29+
echo "Adding files..."
30+
git add .
31+
git commit -m "Automated push of generated docs from SHA: https://github.com/angular/angular.dart/commit/$SHA"
32+
git push
33+
fi
3534
fi
3635

3736

0 commit comments

Comments
 (0)