Skip to content
Browse files

install.pl, pta hook, upgrade doc:

  - install the post-update hook also
  - fix bashism in pta-hook

Also, since delegation works best with PTA, reflect that in the upgrade doc
  • Loading branch information...
1 parent 3c960aa commit 8096cc8e9c9ecdfb511c4e1c859def54878f44ee Sitaram Chamarty committed
Showing with 11 additions and 1 deletion.
  1. +3 −0 doc/0-UPGRADE.mkd
  2. +6 −0 src/install.pl
  3. +2 −1 src/pta-hook.sh
View
3 doc/0-UPGRADE.mkd
@@ -35,6 +35,9 @@ have to do it at a "quiet" time or something.
src/gl-compile-conf
+ (if you've already setup "push-to-admin", this step should be replaced by
+ a "git push". Make a dummy commit if needed, to make the push happen).
+
And you're done.
### upgrade notes for specific versions
View
6 src/install.pl
@@ -64,3 +64,9 @@ sub wrap_mkdir
system("cp $GL_ADMINDIR/src/update-hook.pl $repo/hooks/update");
chmod 0755, "$repo/hooks/update";
}
+
+# oh and one of those repos is a bit more special and has an extra hook :)
+system("cp $GL_ADMINDIR/src/pta-hook.sh gitolite-admin.git/hooks/post-update");
+system("perl", "-i", "-p", "-e", "s(export GL_ADMINDIR=.*)(export GL_ADMINDIR=$GL_ADMINDIR)",
+ "gitolite-admin.git/hooks/post-update");
+chmod 0755, "gitolite-admin.git/hooks/post-update";
View
3 src/pta-hook.sh
@@ -16,7 +16,8 @@ mkdir $GL_ADMINDIR/conf/fragments
for br in $(git for-each-ref --format='%(refname:short)')
do
# skip master (duh!)
- [[ $br == master ]] && continue
+ [ "$br" = "master" ] && continue
+
# all other branches *should* contain a file called <branchname>.conf
# inside conf/fragments; if so copy it
if git show $br:conf/fragments/$br.conf > /dev/null 2>&1

0 comments on commit 8096cc8

Please sign in to comment.
Something went wrong with that request. Please try again.