Skip to content

Commit

Permalink
Fix repology JSON parsing
Browse files Browse the repository at this point in the history
Why did the API change if I still use the v1 API?
  • Loading branch information
xtaran committed May 7, 2024
1 parent 496b107 commit 22a040a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/newest-openssh-version-on-repology.pl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
my $ua = Mojo::UserAgent->new;

c( map { $_->{version} =~ s/_//r } # Some distributions use "X.Y_pZ"
grep { exists($_->{name}) and exists($_->{status}) and
$_->{name} eq "openssh" and $_->{status} eq "newest" }
grep { ( ( exists($_->{name}) && $_->{name} eq "openssh" ) or
( exists($_->{srcname}) and $_->{srcname} eq "openssh" ) ) and
exists($_->{status}) and $_->{status} eq "newest" }
@{ $ua->get($api_url)->result->json }
)->uniq->join("\n")->say;

0 comments on commit 22a040a

Please sign in to comment.