1
0
Fork 0
mirror of synced 2025-09-23 04:08:33 +00:00
ZoKrates/scripts/publish_book.sh
Thibaut Schaeffer 5dc8690e24
Update scripts/publish_book.sh
Co-Authored-By: stefandeml <stefandeml@gmail.com>
2018-12-19 09:19:59 +01:00

18 lines
767 B
Bash
Executable file

# Exit if any subcommand fails
set -e
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=$(cat ../zokrates_cli/Cargo.toml | grep '^version' | awk '{print $3}' | sed -e 's/"//g') && echo $TAG
../ghp-import/ghp_import.py -n -p -f -m "Documentation upload. Version: $TAG" -b "master" -r https://zokratesbot:"$GH_TOKEN"@github.com/Zokrates/zokrates.github.io.git ../book
echo "Published book"
fi