Added ability to get assets URL for release
This commit is contained in:
parent
cff31239fc
commit
9776bcb943
1 changed files with 15 additions and 4 deletions
|
|
@ -68,11 +68,22 @@ my $latest_release_hash = decode_json($resp->content);
|
||||||
# In case we need to deref later
|
# In case we need to deref later
|
||||||
#my %latest_release_data = %$latest_release_hash;
|
#my %latest_release_data = %$latest_release_hash;
|
||||||
|
|
||||||
my $tag = $latest_release_hash->{tag_name};
|
my $tag = $latest_release_hash->{tag_name}; # Works
|
||||||
printf("The latest gitea version is $tag\n");
|
printf("The latest gitea version is $tag\n");
|
||||||
my $assetsURL = $latest_release_hash->{tag_name};
|
|
||||||
printf ("!!! Dump of assets URL");
|
my $release_id = $latest_release_hash->{id}; # Works
|
||||||
printf Dumper $assetsURL;
|
printf("The release id for the latest gitea version is $release_id\n");
|
||||||
|
|
||||||
|
# Assets URL is
|
||||||
|
# GET /repos/:owner/:repo/releases/:release_id/assets
|
||||||
|
# Single asset URL is
|
||||||
|
# GET /repos/:owner/:repo/releases/assets/:asset_id
|
||||||
|
|
||||||
|
# https://api.github.com/repos/go-gitea/gitea/releases/16739869/assets
|
||||||
|
my $assetsURL = 'https://api.github.com/repos/go-gitea/gitea/releases/' . $release_id . '/assets';
|
||||||
|
# printf("!!! Dump of assets URL");
|
||||||
|
# printf("!!! $assetsURL\n");
|
||||||
|
|
||||||
|
|
||||||
if ( $tag gt $gitea_current_version ) {
|
if ( $tag gt $gitea_current_version ) {
|
||||||
printf("Proceeding with update\n");
|
printf("Proceeding with update\n");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue