implement skip_dirs in clonedev
This commit is contained in:
parent
5cf5a09bed
commit
372b4a0116
1 changed files with 11 additions and 11 deletions
|
@ -9,9 +9,9 @@ use WWW::Curl::Easy;
|
||||||
use WWW::Curl::Multi;
|
use WWW::Curl::Multi;
|
||||||
use File::Path("make_path");
|
use File::Path("make_path");
|
||||||
|
|
||||||
# use Data::Dumper;
|
use Data::Dumper;
|
||||||
# $Data::Dumper::Pair = " : ";
|
$Data::Dumper::Pair = " : ";
|
||||||
# $Data::Dumper::Indent = 2;
|
$Data::Dumper::Indent = 2;
|
||||||
|
|
||||||
# TODO: Async the git clones
|
# TODO: Async the git clones
|
||||||
# TODO: Show hook/clone output in a prettier fashion (like docker buildx)
|
# TODO: Show hook/clone output in a prettier fashion (like docker buildx)
|
||||||
|
@ -91,12 +91,12 @@ sub url_filter($handle) {
|
||||||
my @tmp;
|
my @tmp;
|
||||||
my $lookup = $conf{lookups}[ $handles[$handle]->{lookup} ];
|
my $lookup = $conf{lookups}[ $handles[$handle]->{lookup} ];
|
||||||
for my $repo ( @{ $handles[$handle]{memory} } ) {
|
for my $repo ( @{ $handles[$handle]{memory} } ) {
|
||||||
if ( $repo->{ $lookup->{url_type} } ) {
|
if ( $repo->{ $lookup->{url_field} } ) {
|
||||||
push( @tmp, $repo->{ $lookup->{url_type} } );
|
push( @tmp, $repo->{ $lookup->{url_field} } );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
error(
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
next if (grep({ $_ eq $repo{fullname} } @{$conf{skip_repos}}));
|
||||||
|
|
||||||
my $path;
|
my $path;
|
||||||
for my $directory ( @{ $conf{directories} } ) {
|
for my $directory ( @{ $conf{directories} } ) {
|
||||||
for my $reponame ( @{ %$directory{repos} } ) {
|
if (grep({ $_ eq $repo{fullname} } @{ %$directory{repos} })) {
|
||||||
if ( $reponame eq "$repo{fullname}" ) {
|
$path = %$directory{path};
|
||||||
$path = %$directory{path};
|
last;
|
||||||
last;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue