File tree 2 files changed +59
-1
lines changed
2 files changed +59
-1
lines changed Original file line number Diff line number Diff line change
1
+ package OOCEapps::PkgUpd::Mattermost ;
2
+ use Mojo::Base ' OOCEapps::PkgUpd::base' ;
3
+
4
+ my $LTSVER = ' 9.5' ;
5
+
6
+ # public methods
7
+ sub canParse {
8
+ my $self = shift ;
9
+ my $name = shift ;
10
+ my $url = shift ;
11
+
12
+ return $name =~ / mattermost$ / ;
13
+ }
14
+
15
+ sub getVersions {
16
+ my $self = shift ;
17
+ my $name = shift ;
18
+ my $res = shift ;
19
+
20
+ $name = $self -> extractName($name );
21
+
22
+ return [
23
+ map { / $name -team-(\Q $LTSVER \E [.\d ]+)-linux-amd64.tar.gz/ }
24
+ $res -> dom-> find(' a' )-> each
25
+ ];
26
+ }
27
+
28
+ 1;
29
+
30
+ __END__
31
+
32
+ =head1 COPYRIGHT
33
+
34
+ Copyright 2024 OmniOS Community Edition (OmniOSce) Association.
35
+
36
+ =head1 LICENSE
37
+
38
+ This program is free software: you can redistribute it and/or modify it
39
+ under the terms of the GNU General Public License as published by the Free
40
+ Software Foundation, either version 3 of the License, or (at your option)
41
+ any later version.
42
+ This program is distributed in the hope that it will be useful, but WITHOUT
43
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
44
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
45
+ more details.
46
+ You should have received a copy of the GNU General Public License along with
47
+ this program. If not, see L<http://www.gnu.org/licenses/> .
48
+
49
+ =head1 AUTHOR
50
+
51
+ S<Dominik Hassler E<lt> hadfl@omnios.orgE<gt> >
52
+
53
+ =head1 HISTORY
54
+
55
+ 2014-03-10 had Initial Version
56
+
57
+ =cut
58
+
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ sub getVersions {
19
19
20
20
$name = $self -> extractName($name );
21
21
return [
22
- map { / $name -($PERLVER \.\d +)\. (?:tar\. (?:gz|xz|bz2|lz)|zip)/i }
22
+ map { / $name -(\Q $PERLVER \E \.\d +)\. (?:tar\. (?:gz|xz|bz2|lz)|zip)/i }
23
23
$res -> dom-> find(' a' )-> each
24
24
];
25
25
}
You can’t perform that action at this time.
0 commit comments