Skip to content

Commit

Permalink
EUMM branch: Module::Install does not create META.json
Browse files Browse the repository at this point in the history
Looks for both META.json and META.yml.
  • Loading branch information
zmughal committed Aug 12, 2023
1 parent bf6f6d3 commit e953d3f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions github-actions/build-dist/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inputs:
default: ''
outputs:
min-perl-version:
description: "Minimum Perl version from META.json"
description: "Minimum Perl version from META.*"
value: ${{ steps.dist.outputs.min-perl-version }}
runs:
using: "composite"
Expand Down Expand Up @@ -110,9 +110,10 @@ runs:
# Get minimum Perl to test.
use CPAN::Meta;
use version;
use List::Util qw(max);
die "No META.json" unless -f "$ENV{DIST_OUTPUT}/META.json";
my $meta = CPAN::Meta->load_file("$ENV{DIST_OUTPUT}/META.json");
use List::Util qw(max first);
my $metafile = first { -f } map "$ENV{DIST_OUTPUT}/$_", ('META.json', 'META.yml');
die "No META files in $ENV{DIST_OUTPUT}" unless $metafile;
my $meta = CPAN::Meta->load_file($metafile);
my $v = version->parse(
$meta->effective_prereqs
->requirements_for('runtime', 'requires')
Expand Down

0 comments on commit e953d3f

Please sign in to comment.