Posts Tagged ‘SVN’

by

SVN post-commit hook, API doc autogeneration

Posted in Swell

Generating manually Swell’s API doc actually’s being a pain, we finally chose to generate it automatically through subversion’s repositories hooks.
These hooks once enabled, allows you to listen specific SVN-based events (pre/start/post commit/lock…) and therefore execute your home-made script.

In our case, we use JSDoc to generate the API doc and well, it took about 6mins with one core (2ghz) fully-loaded to parse/generate the documentation for only 4 files…
Let’s hope that we’ll not commit too often.

svn up /path/to/your/repository/api/src
java -jar /path/to/your/repository/api/jsdoc/jsrun.jar /path/to/your/repository/api/jsdoc/app/run.js -r=1 /path/to/your/repository/api/src -t=/path/to/your/repository/api/jsdoc/templates/jsdoc