Last active
August 29, 2015 14:22
-
-
Save motemen/bcb3d76a670a4f2f08af to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
set -e | |
name=$(node -p -e 'require("./bower.json").name') | |
out=./gh-pages | |
rm -rf $out | |
mkdir -p $out | |
cp -R bower_components $out/components | |
git archive --prefix=components/$name/ HEAD | tar x -C $out | |
git rev-parse HEAD > $out/GIT_REVISION | |
cat $out/components/$name/index.html | sed "s:<head>:<head><base href='components/$name/'>:" > $out/index.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment