hook dump-help
This commit is contained in:
parent
dfbd4e69ba
commit
92a222d346
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use v5.10;
|
||||
use utf8;
|
||||
use Carp;
|
||||
use File::Basename;
|
||||
use File::Path qw(remove_tree);
|
||||
use File::Temp qw/tempfile tempdir/;
|
||||
|
||||
use ACU::Log;
|
||||
$ACU::Log::log_file = "/var/log/hooks/" . basename($0) . ".log";
|
||||
use ACU::Process;
|
||||
|
||||
# First, check if the repository is dump-help
|
||||
exit 0 if ($ENV{GL_REPO} ne "dump-help");
|
||||
|
||||
my ($ref, $oldsha, $newsha) = @ARGV;
|
||||
|
||||
log DONE, "This is the dump-help repository!";
|
||||
|
||||
exit 0 if ($newsha eq '0' x 40);
|
||||
|
||||
if ($ref eq "refs/tags/release")
|
||||
{
|
||||
|
||||
my $archive = qx(git archive --format=tgz $newsha);
|
||||
#qx(git clone -b release /srv/git/repositories/dump-help.git '$tempdir') or croak "It is not a valid repository.";
|
||||
|
||||
Process::Client::launch("docs_compile",
|
||||
{
|
||||
"type" => "dump_help",
|
||||
"file" => "dump-help.tgz" ,
|
||||
},
|
||||
{ "dump-help.tgz" => $archive });
|
||||
|
||||
}
|
||||
|
||||
exit 0;
|
Reference in New Issue