2006-06-02 07:32:20 +02:00
|
|
|
A post-commit hook is run every time you commit a change to your
|
2006-09-06 22:31:55 +02:00
|
|
|
[[subversion]] (or [[git]] or [[mercurial]]) repository. To make the wiki be updated each
|
2006-06-02 07:32:20 +02:00
|
|
|
time a commit is made, it can be run from (or as) a post-commit hook.
|
2006-03-11 06:34:08 +01:00
|
|
|
|
2006-06-02 07:32:20 +02:00
|
|
|
The best way to run ikiwiki in a post-commit hook is using a wrapper, which
|
|
|
|
ikiwiki is usually configured to generate using a setup file.
|
2006-03-10 10:16:07 +01:00
|
|
|
|
|
|
|
The generated wrapper is a C program that is designed to safely be made
|
|
|
|
suid if necessary. It's hardcoded to run ikiwiki with the settings
|
2006-03-11 01:40:34 +01:00
|
|
|
specified when you ran --wrapper, and can only be used to update and
|
2006-03-10 10:16:07 +01:00
|
|
|
compile that one checkout into the specified html directory.
|
|
|
|
|
2006-06-02 07:32:20 +02:00
|
|
|
Depending on your setup, the post-commit hook might end up
|
|
|
|
getting called by users who have write access to the repository, but not to
|
2006-03-10 10:16:07 +01:00
|
|
|
your wiki checkout and html directory. If so, you can safely make
|
2006-06-02 07:32:20 +02:00
|
|
|
the wrapper suid to a user who can write there (*not* to root!). You might
|
2006-03-10 10:16:07 +01:00
|
|
|
want to read [[Security]] first.
|
2006-03-13 20:29:21 +01:00
|
|
|
|
2006-08-07 05:39:59 +02:00
|
|
|
[[Setup]] explains setting this up in more detail.
|