Skip to content

Commit

Permalink
Merge pull request #61 from alyec/autodoc
Browse files Browse the repository at this point in the history
RCS Doc Deployment Automation
  • Loading branch information
dan-bowerman authored Nov 15, 2016
2 parents 9b75049 + 2cd9427 commit 827904a
Show file tree
Hide file tree
Showing 7 changed files with 120 additions and 35 deletions.
26 changes: 15 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
env:
global:
secure: L/XoO6PXazMX+mHN8e+csS0hduu0o6IAE5Z9ypa1hN8HZJ0airpGqmD7wGoyhY4d/p3ujf+uyrLvOz/CGuEhSjhp9BDC8Y73h+LQEGsqDHQEV2w9d18jg2HU9WKORWBoAHXf78Us47s74uJsH8+s6gD+1pqVpIBVjuyn+C5+mVQVLSRhT3tbwYpGmA2EY7s9RihJICI/qNGx1xAlx/kF+hd2Z+RbBJLhyyuEDWPbhFCMhJ/9pTynDA1qhW8cJHTA3TYO+506+2GJKUroFlg3vo5iMJ33pw6p40oGQlZq+p/FbtxkgdfQnw//XJLzfFaFBhi4sbMLSMiD5FqazhARjH8Bd5UHZg4ZumqYqIMYOPa5RqEWWiJ6cvSRfxEGajnkQDU45F/8lefYl6QfBdnHwDQwoBB2S+nozf1ARW4xZ8Q2BLgrT4zd9C+eKDU6XvtxN9I55GaD0gOUpTeXJCpde1oEtRhPqQWkOn6ij5px7peRf+XAzvGyFiIusKEUUUbUzbGsDcMfY969ckxFVhINQnmGkQuFvdfScYcPX7JHOVdYK3TGNlme4NGrAJVmnnPr8EeNYXM1rg2tFwOV2G8m4XdsYPx4jUuJVpIsbtfzXGb8oZwBxjPJPia3quLrG89QulWJSIlHLD52yf15AxUFm0PN79eahkJf+VfqwQgxuyo=
install:
- pip install -r requirements.txt
- pip install -r requirements-dev.txt
- pip install -e .
language: python
notifications:
webhooks:
on_start: never
urls:
- https://webhooks.gitter.im/e/7bd6d69bcfa59bddf1e2
python:
- "2.7"
install:
- pip install -r requirements.txt
- pip install -r requirements-dev.txt
- pip install -e .
- '2.7'
script:
- make check
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/7bd6d69bcfa59bddf1e2
on_start: never
- make check
- source docs/docdeploy.sh
Binary file added devkey.enc
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/dev/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ see how poorly commented RCS is.
.. toctree::
:maxdepth: 2

rcs
parsers
run
services
22 changes: 0 additions & 22 deletions docs/dev/parsers.rst

This file was deleted.

46 changes: 46 additions & 0 deletions docs/dev/services.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Services
========

The `services` package.

.. automodule:: serivces.registration
:members:
:undoc-members:
:private-members:
:special-members:

.. automodule:: services.retrieval
:members:
:undoc-members:
:private-members:
:special-members:

.. automodule:: services.update
:members:
:undoc-members:
:private-members:
:special-members:

.. automodule:: services.upgrade
:members:
:undoc-members:
:private-members:
:special-members:

.. automodule:: services.utils
:members:
:undoc-members:
:private-members:
:special-members:

.. automodule:: services.v1
:members:
:undoc-members:
:private-members:
:special-members:

.. automodule:: services.v2
:members:
:undoc-members:
:private-members:
:special-members:
29 changes: 29 additions & 0 deletions docs/docdeploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

set -e

if [ "$TRAVIS_REPO_SLUG" == "fgpv-vpgf/rcs" ] && [ -n "$TRAVIS_TAG" ]; then
openssl aes-256-cbc -k "$PW" -out ~/.ssh/id_rsa -in devkey.enc -d
echo -e "Host *\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
chmod 600 ~/.ssh/id_rsa
eval `ssh-agent -s`
ssh-add ~/.ssh/id_rsa

cd docs
make clean
make html
git clone --depth=1 [email protected]:fgpv-vpgf/rcs.git -b gh-pages ghdocs
mkdir -p ghdocs/$TRAVIS_TAG
rsync -av --delete _build/html/ ghdocs/$TRAVIS_TAG/
bash make_doc_index.sh ghdocs/ > ghdocs/index.html

cd ghdocs
git add $TRAVIS_TAG
git add index.html
git config user.email "[email protected]"
git config user.name "Glitch Bot"
git commit -m "Docs for rcs@$TRAVIS_TAG"
git push
cd ..
rm -rf ghdocs
fi
28 changes: 28 additions & 0 deletions docs/make_doc_index.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
HEADER="
<!DOCTYPE html>
<html>
<head>
<title>RCS Docs</title>
<meta name=\"viewport\" content=\"initial-scale=1\" />
</head>
<body>
<h1>RCS Versions</h1>
"
FOOTER="
</body>
</html>
"

makeLi () {
echo "$2<li><a href=\"$1/\">$1</a></li>"
}

makeUl () {
echo " <ul>"
for i in `ls $1`; do if [ -d "$1/$i" ]; then makeLi "$i" " "; fi; done
echo " </ul>"
}

echo $HEADER
makeUl $1
echo $FOOTER

0 comments on commit 827904a

Please sign in to comment.