implement skip_dirs in clonedev
This commit is contained in:
parent
5cf5a09bed
commit
372b4a0116
|
@ -9,9 +9,9 @@ use WWW::Curl::Easy;
|
|||
use WWW::Curl::Multi;
|
||||
use File::Path("make_path");
|
||||
|
||||
# use Data::Dumper;
|
||||
# $Data::Dumper::Pair = " : ";
|
||||
# $Data::Dumper::Indent = 2;
|
||||
use Data::Dumper;
|
||||
$Data::Dumper::Pair = " : ";
|
||||
$Data::Dumper::Indent = 2;
|
||||
|
||||
# TODO: Async the git clones
|
||||
# TODO: Show hook/clone output in a prettier fashion (like docker buildx)
|
||||
|
@ -91,12 +91,12 @@ sub url_filter($handle) {
|
|||
my @tmp;
|
||||
my $lookup = $conf{lookups}[ $handles[$handle]->{lookup} ];
|
||||
for my $repo ( @{ $handles[$handle]{memory} } ) {
|
||||
if ( $repo->{ $lookup->{url_type} } ) {
|
||||
push( @tmp, $repo->{ $lookup->{url_type} } );
|
||||
if ( $repo->{ $lookup->{url_field} } ) {
|
||||
push( @tmp, $repo->{ $lookup->{url_field} } );
|
||||
}
|
||||
else {
|
||||
error(
|
||||
"Failed to extract $lookup->{url_type} while processing lookup: $lookup->{name}"
|
||||
"Failed to extract $lookup->{url_field} while processing lookup: $lookup->{name}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -134,13 +134,13 @@ sub process_urls($handle) {
|
|||
next;
|
||||
}
|
||||
|
||||
next if (grep({ $_ eq $repo{fullname} } @{$conf{skip_repos}}));
|
||||
|
||||
my $path;
|
||||
for my $directory ( @{ $conf{directories} } ) {
|
||||
for my $reponame ( @{ %$directory{repos} } ) {
|
||||
if ( $reponame eq "$repo{fullname}" ) {
|
||||
$path = %$directory{path};
|
||||
last;
|
||||
}
|
||||
if (grep({ $_ eq $repo{fullname} } @{ %$directory{repos} })) {
|
||||
$path = %$directory{path};
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue