This repository has been archived by the owner on Feb 22, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a small shell script to automate updating github pages.
- Loading branch information
Stéphan Kochen
committed
Jun 6, 2010
1 parent
f1728a7
commit 23b7847
Showing
1 changed file
with
38 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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,38 @@ | |||
#!/bin/sh | |||
|
|||
# Updates gh-pages branch with distributables from the current HEAD. | |||
|
|||
if [ ! -f arashi.html ]; then | |||
echo "Execute from the project root!" | |||
exit 1 | |||
fi | |||
|
|||
echo "Uncommitted changes will be lost!" | |||
echo "Press Ctrl+C to abort, or Enter to continue." | |||
read dummy | |||
|
|||
TEMPTAR="/tmp/arashi-gh-pages.tar" | |||
|
|||
set -e | |||
set -x | |||
|
|||
REVISION=`git rev-parse HEAD` | |||
|
|||
make dist | |||
( | |||
cd dist && \ | |||
tar -cf ${TEMPTAR} * && \ | |||
mv arashi.html index.html | |||
) | |||
|
|||
git clean -fdx | |||
git checkout gh-pages | |||
|
|||
tar -xf ${TEMPTAR} | |||
rm -f ${TEMPTAR} | |||
|
|||
git add -A | |||
git commit -a -m "Updating from revision ${REVISION}" | |||
git push origin gh-pages | |||
|
|||
git checkout master |