gh-pages build script cleanup.

This commit is contained in:
Fred Wenzel 2011-06-03 14:26:41 -07:00
Родитель 8d4ff23b0c
Коммит 5a77b4cb13
1 изменённых файлов: 10 добавлений и 3 удалений

13
docs/build-github.zsh Normal file → Executable file
Просмотреть файл

@ -3,7 +3,8 @@
# Should be run from the docs directory: (cd docs && ./build-github.zsh)
REPO=$(git config remote.origin.url)
GH=_gh-pages
HERE=$(dirname $0)
GH=$HERE/_gh-pages
# Checkout the gh-pages branch, if necessary.
@ -15,16 +16,22 @@ if [[ ! -d $GH ]]; then
fi
# Update and clean out the _gh-pages target dir.
pushd $GH && git pull && rm -rf * && popd
pushd $GH
git pull && rm -rf *
popd
# Make a clean build.
pushd $HERE
make clean dirhtml
# Move the fresh build over.
cp -r _build/dirhtml/* $GH
cd $GH
pushd $GH
# Commit.
git add .
git commit -am "gh-pages build on $(date)"
git push origin gh-pages
popd
popd