From 00dd77c57cf331ddf119b4d9a33508d966738164 Mon Sep 17 00:00:00 2001 From: Dominik Hassler Date: Fri, 12 Jan 2024 16:07:33 +0000 Subject: [PATCH] pkgupd: fix zig parser --- lib/OOCEapps/PkgUpd/Zig.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/OOCEapps/PkgUpd/Zig.pm b/lib/OOCEapps/PkgUpd/Zig.pm index 9519021..5953c10 100644 --- a/lib/OOCEapps/PkgUpd/Zig.pm +++ b/lib/OOCEapps/PkgUpd/Zig.pm @@ -7,7 +7,7 @@ sub canParse { my $name = shift; my $url = shift; - return $name =~ m!developer/zig$!; + return $name =~ m!developer/zig-!; } sub getVersions { @@ -15,7 +15,9 @@ sub getVersions { 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; @@ -24,7 +26,7 @@ __END__ =head1 COPYRIGHT -Copyright 2022 OmniOS Community Edition (OmniOSce) Association. +Copyright 2024 OmniOS Community Edition (OmniOSce) Association. =head1 LICENSE