Lines 77-87
if ($plugins_enabled) {
Link Here
|
77 |
foreach my $result ( @{ $response->{items} } ) { |
77 |
foreach my $result ( @{ $response->{items} } ) { |
78 |
next unless $result->{name} =~ /^koha-plugin-/; |
78 |
next unless $result->{name} =~ /^koha-plugin-/; |
79 |
my $releases = $result->{url} . "/releases/latest"; |
79 |
my $releases = $result->{url} . "/releases/latest"; |
80 |
my $release = from_json( get($releases) ); |
80 |
my $release = from_json( get($releases) ); |
|
|
81 |
my $tag_name = $release->{tag_name}; |
81 |
for my $asset ( @{$release->{assets}} ) { |
82 |
for my $asset ( @{$release->{assets}} ) { |
82 |
if ($asset->{browser_download_url} =~ m/\.kpz$/) { |
83 |
if ($asset->{browser_download_url} =~ m/\.kpz$/) { |
83 |
$result->{install_name} = $asset->{name}; |
84 |
$result->{install_name} = $asset->{name}; |
84 |
$result->{install_url} = $asset->{browser_download_url}; |
85 |
$result->{install_url} = $asset->{browser_download_url}; |
|
|
86 |
$result->{tag_name} = $tag_name; |
85 |
} |
87 |
} |
86 |
} |
88 |
} |
87 |
push( @results, { repo => $r, result => $result } ); |
89 |
push( @results, { repo => $r, result => $result } ); |
Lines 100-111
if ($plugins_enabled) {
Link Here
|
100 |
my @releases = @{ from_json( get($releases_url) ) }; |
102 |
my @releases = @{ from_json( get($releases_url) ) }; |
101 |
|
103 |
|
102 |
if ( scalar @releases > 0 ) { |
104 |
if ( scalar @releases > 0 ) { |
|
|
105 |
|
103 |
# Pick the first one, the latest release |
106 |
# Pick the first one, the latest release |
104 |
my $latest = $releases[0]; |
107 |
my $latest = $releases[0]; |
105 |
my $name = $latest->{name}; |
108 |
my $name = $latest->{name}; |
106 |
my @links = @{$latest->{assets}->{links}}; |
109 |
my $tag_name = $latest->{tag_name}; |
107 |
my $url = $links[0]->{direct_asset_url}; |
110 |
my @links = @{ $latest->{assets}->{links} }; |
108 |
my @parts = split( '/', $url); |
111 |
my $url = $links[0]->{direct_asset_url}; |
|
|
112 |
my @parts = split( '/', $url ); |
109 |
my $filename = $parts[-1]; |
113 |
my $filename = $parts[-1]; |
110 |
next unless $url =~ m/\.kpz$/; |
114 |
next unless $url =~ m/\.kpz$/; |
111 |
my $result = { |
115 |
my $result = { |
Lines 114-119
if ($plugins_enabled) {
Link Here
|
114 |
install_url => $url, |
118 |
install_url => $url, |
115 |
html_url => $web_url, |
119 |
html_url => $web_url, |
116 |
name => $name, |
120 |
name => $name, |
|
|
121 |
tag_name => $tag_name, |
117 |
}; |
122 |
}; |
118 |
push @results, { repo => $r, result => $result }; |
123 |
push @results, { repo => $r, result => $result }; |
119 |
} |
124 |
} |
120 |
- |
|
|