Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
complain if the travis config contains "rakudobrew build panda"
  • Loading branch information
timo committed Oct 7, 2017
1 parent 83336e9 commit 78b69a5
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/ModulesPerl6/DbBuilder/Dist/PostProcessor/p30METAChecker.pm
Expand Up @@ -34,6 +34,7 @@ sub _check_todo_problems {
push @problems, problem 'Missing MANIFEST file', 3
if $dist->{dist_source} eq 'cpan'
and not grep $_ eq 'MANIFEST', @files;
push @problems, $self->_check_todo_problem_travis_yml($dist, \@files);
}
else {
# If we're here that can mean the dist was processed in abridged,
Expand Down Expand Up @@ -107,6 +108,22 @@ sub _check_meta_url {
"HTTP $code when accessing dist source URL ($dist->{url})";
}

sub _check_todo_problem_travis_yml {
my ($self, $dist, $files) = @_;

my ($travisyml) = grep $_->{name} =~ /^.travis.yml/i, @$files
or return;

# If we failed to fetch the travis yml content, return any cached travis
# problems.
return grep $_->{problem} =~ /\bTravis-CI\b/, ($dist->{problems} || [])->@*
if $travisyml->{error};

return unless $travisyml->{content} =~ /\brakudobrew\s+build[- ]panda\b/;
problem 'Travis-CI config asks rakudobrew to build panda.', 3
}


1;

__END__
Expand Down

0 comments on commit 78b69a5

Please sign in to comment.