-
Notifications
You must be signed in to change notification settings - Fork 0
Add option to clone submodules recursively #12
Copy link
Copy link
Open
Description
One reason why this plugin may be needed is that GitHub archive links do not contain submodules at this time.
A work around for now is to do the following:
use File::chdir;
share {
...
plugin 'Download::Git';
# Need to fetch the submodules too.
meta->around_hook( fetch => sub {
my $orig = shift;
my $build = shift;
my $data = $orig->($build, @_);
if( $data->{type} eq 'file' ) {
local $CWD = $data->{path};
$build->log("In $CWD");
$build->system(
'%{git}',
qw(submodule update),
qw(--init --recursive),
);
}
return $data;
});
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels