File tree Expand file tree Collapse file tree 2 files changed +46
-1
lines changed Expand file tree Collapse file tree 2 files changed +46
-1
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
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
+
8
+ docsPath=" ./dist/docs"
9
+ tempRepoPath=" ./dist/tempRepo"
10
+ repoUrl=" https://github.com/angular/material2-docs-content"
11
+
12
+ # If the docs directory is not present, generate docs
13
+ if [ ! -d $docsPath ]; then
14
+ $( npm bin) /gulp docs
15
+ fi
16
+
17
+ # Get git meta info for commit
18
+ commitSha=" $( git rev-parse --short HEAD) "
19
+ commitAuthorName=" $( git --no-pager show -s --format=' %an' HEAD) "
20
+ commitAuthorEmail=" $( git --no-pager show -s --format=' %ae' HEAD) "
21
+ commitMessage=" $( git log --oneline -n 1) "
22
+
23
+ # create directory and clone test repo
24
+ rm -rf $tempRepoPath
25
+ mkdir $tempRepoPath
26
+ git clone $repoUrl $tempRepoPath
27
+
28
+ # Clean out repo directory and copy contents of dist/docs into it
29
+ rm -rf $tempRepoPath /*
30
+ mkdir $tempRepoPath /docs
31
+ cp -r $docsPath /* $tempRepoPath /docs
32
+
33
+ # Push content to repo
34
+ cd $tempRepoPath
35
+ git config user.name " $commitAuthorName "
36
+ git config user.email " $commitAuthorEmail "
37
+ git config credential.helper " store --file=.git/credentials"
38
+
39
+ echo " https://${MATERIAL2_BUILDS_TOKEN} :@github.com" > .git/credentials
40
+
41
+ git add -A
42
+ git commit -m " $commitMessage "
43
+ git tag " $commitSha "
44
+ git push origin master --tags
You can’t perform that action at this time.
0 commit comments