diff --git a/lib/OOCEapps/Controller/PkgUpd.pm b/lib/OOCEapps/Controller/PkgUpd.pm index aefab70..a1646b6 100644 --- a/lib/OOCEapps/Controller/PkgUpd.pm +++ b/lib/OOCEapps/Controller/PkgUpd.pm @@ -44,7 +44,7 @@ my $getPkgAvailVer = sub { $pl->{$chunk->[$i]}->{availVer} = $self->config->{parser} ->{exists $self->config->{parser}->{$chunk->[$i]} ? $chunk->[$i] : 'DEFAULT'} - ->getVersions($chunk->[$i], $tx[$i]->[0]->result); + ->getVersions($chunk->[$i], $tx[$i]->[0]->result, $tx[$i]->[0]->req->url); } })->wait; diff --git a/lib/OOCEapps/PkgUpd/GitHub.pm b/lib/OOCEapps/PkgUpd/GitHub.pm index cef813c..6a913e9 100644 --- a/lib/OOCEapps/PkgUpd/GitHub.pm +++ b/lib/OOCEapps/PkgUpd/GitHub.pm @@ -31,6 +31,7 @@ sub getVersions { my $self = shift; my $name = shift; my $res = shift; + my $url = shift; $name = $self->extractName($name); @@ -49,9 +50,11 @@ sub getVersions { s/(\d+)-/$1./g for @versions; } + my $prog = $url->path->[1]; + return [ grep { /^$ver/ } - map { m#/releases/tag/(?:v(?:er\.)?|rel(?:ease)?[-.]|stable-|R\.|$name-?\.?)? + map { m#/\Q$prog\E/releases/tag/(?:v(?:er\.)?|rel(?:ease)?[-.]|stable-|R\.|$name-?\.?)? (\d{4}(?:-\d{2}){2}T(?:\d{2}-){2}\d{2}Z|[\d.]+(?:op)?\d+) (?!-?(?:\.\d+|\.?(?:rc\d*|dev|a(?:lpha)?|b(?:eta)?|pre|test)))#ix } @versions