66cd " $( dirname $0 ) /../../"
77
88docsPath=" ./dist/docs"
9+ packagePath=" ./dist/releases/material-examples"
910repoPath=" /tmp/material2-docs-content"
1011repoUrl=" https://github.com/angular/material2-docs-content"
1112examplesSource=" ./dist/docs/examples"
1213
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
1716
1817# Get git meta info for commit
1918commitSha=" $( git rev-parse --short HEAD) "
@@ -28,15 +27,16 @@ git clone $repoUrl $repoPath
2827
2928# Clean out repo directory and copy contents of dist/docs into it
3029rm -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}
3633
3734# Copy api files over to $repoPath/api
3835cp -r $docsPath /api/* $repoPath /api
3936
37+ # Copy the material-examples package to the docs content repository.
38+ cp -r $packagePath /* $repoPath /examples-package
39+
4040# Flatten the markdown docs structure and move it into $repoPath/overview
4141overviewFiles=$docsPath /markdown/
4242for filename in $overviewFiles *
6565cp -r $examplesSource /* $repoPath /examples
6666
6767# Copy example plunker assets
68- rsync -a $docsPath /plunker $repoPath /plunker
68+ cp -r $docsPath /plunker/ * $repoPath /plunker
6969
7070# Copies assets over to the docs-content repository.
7171cp LICENSE $repoPath /
0 commit comments