Skip to content

Commit

Permalink
pkgupd: fix zig parser
Browse files Browse the repository at this point in the history
  • Loading branch information
hadfl committed Jan 12, 2024
1 parent a250daa commit 00dd77c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/OOCEapps/PkgUpd/Zig.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ sub canParse {
my $name = shift;
my $url = shift;

return $name =~ m!developer/zig$!;
return $name =~ m!developer/zig-!;
}

sub getVersions {
my $self = shift;
my $name = shift;
my $res = shift;

return [ grep { /^[\d.]+$/ } keys %{$res->json // {}} ];
($name, my $ver) = $self->extractNameMajVer($name);

return [ grep { /^\Q$ver\E[\d.]+$/ } keys %{$res->json // {}} ];
}

1;
Expand All @@ -24,7 +26,7 @@ __END__
=head1 COPYRIGHT
Copyright 2022 OmniOS Community Edition (OmniOSce) Association.
Copyright 2024 OmniOS Community Edition (OmniOSce) Association.
=head1 LICENSE
Expand Down

0 comments on commit 00dd77c

Please sign in to comment.