Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate documentation by running a command with every svn commit

Is it possible to make svn run some command before every commit? I have some documentation in LaTeX in the repository and would like to have always the latest version of the compiled docs available as a PDF in the repository. The same would go with Doxygen docs.

I'd bet that there is some magic svn:something property or something like that, but haven't found anything yet.

like image 995
cube Avatar asked Apr 26 '09 15:04

cube


2 Answers

You can easily do the reverse. Create a shell script that runs svn commit after building stuff.

like image 127
mmx Avatar answered Sep 26 '22 18:09

mmx


If you auto-generate the documentation, why put it in the repository at all? You create it every time, so there's no point in having it versioned too (it's generated after all). I'd rather use a pre-commit hook to generate the documentation and put it into a common place to access it than storing it in the repository -- storing it in the repository is creating redundancy which should be avoided from my point of view.

(And I agree that pre-commit hooks should not modify what's being committed :)

like image 44
bluebrother Avatar answered Sep 26 '22 18:09

bluebrother