summaryrefslogtreecommitdiff
path: root/buildbot/build-docs.sh
blob: 33d7563d81791170c5bbcb93c4651dd9b0498acc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash

set -eu

fetch () {
  git clean -fdx
  git fetch
  # reset to updated upstream branch, but only if we're tracking a branch
  branch=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo head)
  git reset --hard "$branch"
}

# Remove local path re: using global buildbot-worker not pip local install
#export PATH=$HOME/.local/bin:$PATH

#logfile="/tmp/sphinx-warnings.log"
#if [ -f "$logfile" ]
#  then
#    echo
#    echo $logfile " exists.  Removing."
#    rm $logfile
#  else
#    echo "Info: existing log file '$logfile' not found."
#fi

cd $HOME/docs
fetch
make html
make latexpdf

mkdir -p $HOME/build/docs/html/
mkdir -p $HOME/build/docs/pdf/

cp -r _build/html/* $HOME/build/docs/html/
cp -r _build/latex/*.pdf $HOME/build/docs/pdf/

#cat $logfile