1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00

only publish master branch and add tag to commit msg

This commit is contained in:
sdeml 2018-12-08 16:53:42 +01:00
parent 614b9f118a
commit cb9a482fe4

View file

@ -1,14 +1,22 @@
# Exit if any subcommand fails
set -e
apt-get update
apt-get -qq install git python-minimal
python --version
cargo install mdbook
cd zokrates_book && mdbook build
git config --global user.email "stefan.deml+zokratesbot@decentriq.ch"
git clone https://github.com/Zokrates/zokrates.github.io.git
git clone https://github.com/davisp/ghp-import.git
cd zokrates.github.io
../ghp-import/ghp_import.py -n -p -f -m "Documentation upload" -b "master" -r https://zokratesbot:"$GH_TOKEN"@github.com/Zokrates/zokrates.github.io.git ../book
echo "Published book"
if [["$CIRCLE_BRANCH" == "master"]]; then
apt-get update
apt-get -qq install git python-minimal
python --version
cargo install mdbook
cd zokrates_book && mdbook build
git config --global user.email "stefan.deml+zokratesbot@decentriq.ch"
git clone https://github.com/Zokrates/zokrates.github.io.git
git clone https://github.com/davisp/ghp-import.git
cd zokrates.github.io
{
TAG=$(git describe --tags) && echo $TAG
} || {
echo "No tag found"
}
../ghp-import/ghp_import.py -n -p -f -m "Documentation upload $TAG" -b "master" -r https://zokratesbot:"$GH_TOKEN"@github.com/Zokrates/zokrates.github.io.git ../book
echo "Published book"
fi