6
6
cd " $( dirname $0 ) /../../"
7
7
8
8
docsPath=" ./dist/docs"
9
+ packagePath=" ./dist/releases/material-examples"
9
10
repoPath=" /tmp/material2-docs-content"
10
11
repoUrl=" https://github.com/angular/material2-docs-content"
11
12
examplesSource=" ./dist/docs/examples"
12
13
13
- # If the docs directory is not present, generate docs
14
- if [ ! -d $docsPath ]; then
15
- $( npm bin) /gulp docs
16
- fi
14
+ $( npm bin) /gulp examples:release
15
+ $( npm bin) /gulp docs
17
16
18
17
# Get git meta info for commit
19
18
commitSha=" $( git rev-parse --short HEAD) "
@@ -28,15 +27,16 @@ git clone $repoUrl $repoPath
28
27
29
28
# Clean out repo directory and copy contents of dist/docs into it
30
29
rm -rf $repoPath /*
31
- mkdir $repoPath /overview
32
- mkdir $repoPath /guides
33
- mkdir $repoPath /api
34
- mkdir $repoPath /examples
35
- mkdir $repoPath /plunker
30
+
31
+ # Create folders that will contain docs content files.
32
+ mkdir $repoPath /{overview,guides,api,examples,plunker,examples-package}
36
33
37
34
# Copy api files over to $repoPath/api
38
35
cp -r $docsPath /api/* $repoPath /api
39
36
37
+ # Copy the material-examples package to the docs content repository.
38
+ cp -r $packagePath /* $repoPath /examples-package
39
+
40
40
# Flatten the markdown docs structure and move it into $repoPath/overview
41
41
overviewFiles=$docsPath /markdown/
42
42
for filename in $overviewFiles *
65
65
cp -r $examplesSource /* $repoPath /examples
66
66
67
67
# Copy example plunker assets
68
- rsync -a $docsPath /plunker $repoPath /plunker
68
+ cp -r $docsPath /plunker/ * $repoPath /plunker
69
69
70
70
# Copies assets over to the docs-content repository.
71
71
cp LICENSE $repoPath /
0 commit comments