This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(build): add script to snapshot docs site
run snapshot script on travis enforce token for github access snapshot only commits to master rename snapshot to HEAD Closes #2852.
- Loading branch information
1 parent
af9f896
commit 76e3672
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
ARG_DEFS=( | ||
"--version=(.*)" | ||
) | ||
|
||
function run { | ||
cd ../ | ||
|
||
echo "-- Building docs site release..." | ||
rm -rf dist | ||
gulp docs --release | ||
|
||
echo "-- Cloning code.material.angularjs.org..." | ||
rm -rf code.material.angularjs.org | ||
git clone https://angular:$GH_TOKEN@github.com/angular/code.material.angularjs.org.git --depth=1 | ||
|
||
echo "-- Remove previous snapshot..." | ||
rm -rf code.material.angularjs.org/HEAD | ||
|
||
echo "-- Copying docs site to snapshot..." | ||
cp -Rf dist/docs code.material.angularjs.org/HEAD | ||
|
||
cd code.material.angularjs.org | ||
|
||
echo "-- Commiting snapshot..." | ||
git add -A | ||
git commit -m "snapshot: $VERSION" | ||
|
||
echo "-- Pushing snapshot..." | ||
git push -q origin master | ||
|
||
cd ../ | ||
|
||
echo "-- Cleanup..." | ||
rm -rf code.material.angularjs.org | ||
|
||
echo "-- Successfully pushed the snapshot to angular/code.material.angularjs.org!!" | ||
} | ||
|
||
source $(dirname $0)/utils.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters