зеркало из https://github.com/mozilla/bedrock.git
gh-pages build script cleanup.
This commit is contained in:
Родитель
8d4ff23b0c
Коммит
5a77b4cb13
|
@ -3,7 +3,8 @@
|
||||||
# Should be run from the docs directory: (cd docs && ./build-github.zsh)
|
# Should be run from the docs directory: (cd docs && ./build-github.zsh)
|
||||||
|
|
||||||
REPO=$(git config remote.origin.url)
|
REPO=$(git config remote.origin.url)
|
||||||
GH=_gh-pages
|
HERE=$(dirname $0)
|
||||||
|
GH=$HERE/_gh-pages
|
||||||
|
|
||||||
|
|
||||||
# Checkout the gh-pages branch, if necessary.
|
# Checkout the gh-pages branch, if necessary.
|
||||||
|
@ -15,16 +16,22 @@ if [[ ! -d $GH ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Update and clean out the _gh-pages target dir.
|
# 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.
|
# Make a clean build.
|
||||||
|
pushd $HERE
|
||||||
make clean dirhtml
|
make clean dirhtml
|
||||||
|
|
||||||
# Move the fresh build over.
|
# Move the fresh build over.
|
||||||
cp -r _build/dirhtml/* $GH
|
cp -r _build/dirhtml/* $GH
|
||||||
cd $GH
|
pushd $GH
|
||||||
|
|
||||||
# Commit.
|
# Commit.
|
||||||
git add .
|
git add .
|
||||||
git commit -am "gh-pages build on $(date)"
|
git commit -am "gh-pages build on $(date)"
|
||||||
git push origin gh-pages
|
git push origin gh-pages
|
||||||
|
|
||||||
|
popd
|
||||||
|
popd
|
||||||
|
|
Загрузка…
Ссылка в новой задаче