Make doc builder a little more useful
This commit is contained in:
parent
32d5544900
commit
02a5d774ef
3
.gitignore
vendored
3
.gitignore
vendored
@ -6,4 +6,5 @@ botenv
|
||||
dist
|
||||
build
|
||||
pyircbot.egg-info
|
||||
dev
|
||||
dev
|
||||
docs/builder/build.sh
|
||||
|
@ -4,6 +4,4 @@ COPY start /start
|
||||
|
||||
RUN apt-get update ; apt-get install -y python3 python3-sphinx python3-setuptools python3-dev python3-requests python3-pip python3-yaml python3-lxml make wget unzip libmysqlclient-dev ; pip3 install pytz praw ; cd /tmp ; wget https://github.com/jgarzik/python-bitcoinrpc/archive/master.zip ; unzip master.zip ; cd python-bitcoinrpc-master/ ; python3 setup.py install ; cd /tmp ; wget https://github.com/dpedu/MySQL-for-Python-3/archive/master.zip -O mysqldb.zip ; unzip mysqldb.zip ; cd MySQL-for-Python-3-master/ ; python3 setup.py install ; chmod +x /start ; mkdir /tmp/docs
|
||||
|
||||
VOLUME /tmp/docs
|
||||
|
||||
CMD /start
|
||||
|
@ -7,3 +7,7 @@ A docker image for building pyircbot's docs.
|
||||
|
||||
* Create image: `cd docs/builder ; docker build -t pybdocbuilder .`
|
||||
* Build docs: `docker run --rm -v /local/path/to/doc/output/:/tmp/docs/ pybdocbuilder /start`
|
||||
|
||||
Or, use a local directory instead of git master and build docs into `docs/_build/html`:
|
||||
|
||||
* `docker run -it --rm -v /localpath/to/pyircbot/repo/:/tmp/pyircbot pyircbotdocbuilder /start`
|
||||
|
@ -1,9 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd /tmp
|
||||
wget http://gitlab.xmopx.net/dave/pyircbot3/repository/archive.tar?ref=master -O pyircbot.tar
|
||||
tar xvf pyircbot.tar
|
||||
cd pyircbot3.git/docs/
|
||||
if [ ! -d "pyircbot" ] ; then
|
||||
mkdir pyircbot
|
||||
wget http://gitlab.xmopx.net/dave/pyircbot3/repository/archive.tar.gz?ref=master -O pyircbot.tgz
|
||||
tar zxvf pyircbot.tgz -C pyircbot/ --strip-components=1
|
||||
fi
|
||||
cd pyircbot/docs/
|
||||
make html
|
||||
rm -rf /tmp/docs/*
|
||||
cp -r _build/html/* /tmp/docs/
|
||||
|
Loading…
Reference in New Issue
Block a user