Cleanup of Travis script
This commit is contained in:
38
.travis.yml
38
.travis.yml
@@ -4,64 +4,66 @@ python:
|
|||||||
- "3.6"
|
- "3.6"
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
# 0) make sure dvipng can be found
|
||||||
- sudo apt-get update
|
- sudo apt-get update
|
||||||
- sudo apt install dvipng
|
- sudo apt install dvipng
|
||||||
# install plasTeX
|
|
||||||
|
# 1) install plasTeX
|
||||||
- git clone https://github.com/gerby-project/plastex.git
|
- git clone https://github.com/gerby-project/plastex.git
|
||||||
- cd plastex
|
- cd plastex
|
||||||
|
# use the Gerby branch of plasTeX
|
||||||
- git checkout gerby
|
- git checkout gerby
|
||||||
|
# actual install
|
||||||
- pip install .
|
- pip install .
|
||||||
- cd ..
|
- cd ..
|
||||||
|
|
||||||
# install Gerby
|
|
||||||
|
# 2) install Gerby
|
||||||
- git clone https://github.com/gerby-project/gerby-website.git
|
- git clone https://github.com/gerby-project/gerby-website.git
|
||||||
- cd gerby-website/gerby/static
|
- cd gerby-website/gerby/static
|
||||||
- git clone https://github.com/sonoisa/XyJax.git
|
# import jQuery Bonsai
|
||||||
- sed -i -e 's@\[MathJax\]@/static/XyJax@' XyJax/extensions/TeX/xypic.js
|
|
||||||
|
|
||||||
- git clone https://github.com/aexmachina/jquery-bonsai
|
- git clone https://github.com/aexmachina/jquery-bonsai
|
||||||
- cp jquery-bonsai/jquery.bonsai.css css/
|
- cp jquery-bonsai/jquery.bonsai.css css/
|
||||||
|
# actual install
|
||||||
- cd ../..
|
- cd ../..
|
||||||
- pip install -e .
|
- pip install -e . # we use -e because we want to change the source files
|
||||||
- cd ..
|
- cd ..
|
||||||
|
|
||||||
# setup configuration
|
# 3) setup configuration
|
||||||
- mv configuration.py gerby-website/gerby/configuration.py
|
- mv configuration.py gerby-website/gerby/configuration.py
|
||||||
|
|
||||||
# setup soft links for plasTeX output
|
# 4) setup soft links for plasTeX output
|
||||||
- cd gerby-website/gerby/tools
|
- cd gerby-website/gerby/tools
|
||||||
- ln -s ../../../document document
|
- ln -s ../../../document document
|
||||||
- ln -s ../../../document.paux document.paux
|
- ln -s ../../../document.paux document.paux
|
||||||
- ln -s ../../../tags tags
|
- ln -s ../../../tags tags
|
||||||
- cd ../../..
|
- cd ../../..
|
||||||
|
|
||||||
# setup soft links for database
|
# 5) setup soft links for database
|
||||||
- cd gerby-website
|
- cd gerby-website
|
||||||
- ln -s gerby/tools/hello-world.sqlite hello-world.sqlite
|
- ln -s gerby/tools/hello-world.sqlite hello-world.sqlite
|
||||||
- ln -s gerby/tools/comments.sqlite comments.sqlite
|
- ln -s gerby/tools/comments.sqlite comments.sqlite
|
||||||
- cd ..
|
- cd ..
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# update tags file with new tags
|
# 1) update tags file with new tags
|
||||||
# in real life: first run it without writing it to the tags file to check for errors
|
|
||||||
- python3 tagger.py >> tags
|
- python3 tagger.py >> tags
|
||||||
|
# in real life: first run it without writing it to the tags file to check for errors
|
||||||
|
|
||||||
# convert to HTML: output goes to document/ folder
|
# 2) convert to HTML: output goes to document/
|
||||||
- plastex --renderer=Gerby ./document.tex
|
- plastex --renderer=Gerby ./document.tex
|
||||||
|
|
||||||
# import database
|
# 3) import plasTeX output into database
|
||||||
- cd gerby-website/gerby/tools
|
- cd gerby-website/gerby/tools
|
||||||
- python3 update.py
|
- python3 update.py
|
||||||
- cd ../..
|
- cd ../..
|
||||||
|
|
||||||
# run Flask
|
# 4) run Flask
|
||||||
- export FLASK_APP=gerby
|
- export FLASK_APP=gerby
|
||||||
- python3 -m flask run &
|
- python3 -m flask run &
|
||||||
- sleep 1
|
|
||||||
|
|
||||||
|
# testing the setup
|
||||||
|
- sleep 1
|
||||||
- wget http://127.0.0.1:5000/tag/0001
|
- wget http://127.0.0.1:5000/tag/0001
|
||||||
- cat 0001
|
- cat 0001
|
||||||
|
|||||||
Reference in New Issue
Block a user