File tree Expand file tree Collapse file tree 3 files changed +50
-2
lines changed Expand file tree Collapse file tree 3 files changed +50
-2
lines changed Original file line number Diff line number Diff line change @@ -10,4 +10,5 @@ cd $(dirname $0)/../..
10
10
if [ " $TRAVIS_PULL_REQUEST " = " false" ] && $( npm bin) /travis-after-modes; then
11
11
echo " All travis modes passed. Publishing the build artifacts..."
12
12
./scripts/release/publish-build-artifacts.sh
13
- fi
13
+ ./scripts/release/publish-docs-artifacts.sh
14
+ fi
Original file line number Diff line number Diff line change @@ -15,4 +15,4 @@ is_aot() {
15
15
16
16
is_payload () {
17
17
[[ " $MODE " = payload ]]
18
- }
18
+ }
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Publish material2 docs assets to the material2-docs-content repo
4
+ # material.angular.io will pull from this assets repo to get the latest docs
5
+
6
+ cd " $( dirname $0 ) /../../"
7
+ root=" $( pwd) "
8
+
9
+ docsPath=" ./dist/docs"
10
+ tempRepoPath=" ./dist/tempRepo"
11
+ repoUrl=" https://github.com/angular/material2-docs-content"
12
+
13
+ # If the docs directory is not present, generate docs
14
+ if [ ! -d $docsPath ]; then
15
+ $( npm bin) /gulp docs
16
+ fi
17
+
18
+ # Get git meta info for commit
19
+ commitSha=" $( git rev-parse --short HEAD) "
20
+ commitAuthorName=" $( git --no-pager show -s --format=' %an' HEAD) "
21
+ commitAuthorEmail=" $( git --no-pager show -s --format=' %ae' HEAD) "
22
+ commitMessage=" $( git log --oneline -n 1) "
23
+
24
+ # create directory and clone test repo
25
+ rm -rf $tempRepoPath
26
+ mkdir $tempRepoPath
27
+ git clone $repoUrl $tempRepoPath
28
+
29
+ # Clean out repo directory and copy contents of dist/docs into it
30
+ rm -rf $tempRepoPath /*
31
+ mkdir $tempRepoPath /docs
32
+ cp -r $docsPath /* $tempRepoPath /docs
33
+
34
+ # Push content to repo
35
+ cd $tempRepoPath
36
+ git config user.name " $commitAuthorName "
37
+ git config user.email " $commitAuthorEmail "
38
+ git config credential.helper " store --file=.git/credentials"
39
+
40
+ echo " https://${MATERIAL2_BUILDS_TOKEN} :@github.com" > .git/credentials
41
+
42
+ git add -A
43
+ git commit -m " $commitMessage "
44
+ git tag " $commitSha "
45
+ git push origin master --tags
46
+
47
+ rm -rf $root /dist/tempRepo
You can’t perform that action at this time.
0 commit comments