-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add script to make gh-pages branches
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
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,29 @@ | ||
#!/bin/bash | ||
|
||
# usage gp Polymer core-item | ||
ORG=$1 | ||
REPO=$2 | ||
|
||
# make folder (same as input, no checking!) | ||
mkdir $repo | ||
git clone [email protected]:$org/$repo.git --single-branch | ||
|
||
# switch to gh-pages branch | ||
pushd $repo >/dev/null | ||
git checkout --orphan gh-pages | ||
|
||
# remove all content | ||
git rm -rf -q . | ||
|
||
# use bower to install runtime deployment | ||
bower install $org/$repo#master | ||
|
||
# redirect by default to the component folder | ||
echo '^<META http-equiv="refresh" content="0;URL=components/%repo%/"^>' >index.html | ||
|
||
# send it all to github | ||
git add -a . | ||
git commit -am 'seed gh-pages' | ||
git push -u origin gh-pages --force | ||
|
||
popd >/dev/null |