Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
Add a small shell script to automate updating github pages.
Browse files Browse the repository at this point in the history
  • 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.
38 changes: 38 additions & 0 deletions util/update_gh_pages.sh
@@ -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

0 comments on commit 23b7847

Please sign in to comment.