changes to custom command invocation etc.; see below
- 'post-compile' subdir moved under 'commands/' but only for sanity; has no real significance now - new, internal use only, gitolite command run-all, as in gitolite run-all POST_COMPILE which runs all the commands in @{ $rc{POST_COMPILE} } in sequence. You can sdo this for any section of course, though this is the only one in the rc right now. (Future candidates: PRE_GIT, POST_GIT, PRE_CREATE, POST_CREATE)
This commit is contained in:
parent
efe37fb8a3
commit
876b554fb5
8 changed files with 79 additions and 59 deletions
|
@ -30,25 +30,7 @@ sub post_update {
|
|||
tsh_try("git checkout -f --quiet master");
|
||||
}
|
||||
_system("$ENV{GL_BINDIR}/gitolite compile");
|
||||
|
||||
# now run optional post-compile features
|
||||
if ( exists $rc{POST_COMPILE} ) {
|
||||
if ( ref( $rc{POST_COMPILE} ) ne 'ARRAY' ) {
|
||||
_warn "bad syntax for specifying post compile scripts; see docs";
|
||||
} else {
|
||||
for my $s ( @{ $rc{POST_COMPILE} } ) {
|
||||
|
||||
# perl-ism; apart from keeping the full path separate from the
|
||||
# simple name, this also protects %rc from change by implicit
|
||||
# aliasing, which would happen if you touched $s itself
|
||||
my $sfp = "$ENV{GL_BINDIR}/post-compile/$s";
|
||||
|
||||
_warn("skipped post-compile script '$s'"), next if not -x $sfp;
|
||||
trace( 2, "post-compile $s" );
|
||||
_system( $sfp, @ARGV ); # they better all return with 0 exit codes!
|
||||
}
|
||||
}
|
||||
}
|
||||
_system("$ENV{GL_BINDIR}/gitolite run-all POST_COMPILE");
|
||||
|
||||
exit 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue