p-t-a: make the post-update hook a separate file...
...and just refer to it in the doc. This hook will acquire more code soon, when we do delegations :)
This commit is contained in:
parent
34a6f89c26
commit
5bb0850c5c
|
@ -70,20 +70,15 @@ repos they play havoc with my git commands, so this is how I do it)
|
|||
GIT_WORK_TREE=/home/git/.gitolite git add conf/gitolite.conf keydir
|
||||
GIT_WORK_TREE=/home/git/.gitolite git commit -am start
|
||||
|
||||
Now we have to setup the post-update hook for push-to-admin to work. The
|
||||
hook should (1) make a forced checkout in the "live" config directory (which
|
||||
is `~/.gitolite`), and (2) run the compile script. So we create a hook with
|
||||
the appropriate code in it, and then make it executable
|
||||
Now we have to setup the post-update hook for push-to-admin to work. The hook
|
||||
should (1) make a forced checkout in the "live" config directory (which is
|
||||
`~/.gitolite`), and (2) run the compile script.
|
||||
|
||||
cat <<EOFPU > hooks/post-update
|
||||
#!/bin/sh
|
||||
|
||||
GIT_WORK_TREE=/home/git/.gitolite git checkout -f
|
||||
|
||||
cd /home/git/.gitolite
|
||||
src/gl-compile-conf
|
||||
EOFPU
|
||||
`src/pta-hook.sh` has the code you need; just copy it to the right place with
|
||||
the right name and make sure it is executable:
|
||||
|
||||
# (assuming pwd is still ~/repositories/gitolite-admin.git)
|
||||
cp ~/.gitolite/src/pta-hook.sh hooks/post-update
|
||||
chmod +x hooks/post-update
|
||||
|
||||
----
|
||||
|
|
6
src/pta-hook.sh
Executable file
6
src/pta-hook.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
GIT_WORK_TREE=/home/git/.gitolite git checkout -f
|
||||
|
||||
cd /home/git/.gitolite
|
||||
src/gl-compile-conf
|
Loading…
Reference in a new issue