cleanup-bintray: keep the most recent, not delete the most recent

This commit is contained in:
Michael Stapelberg 2016-04-09 11:55:25 +02:00
parent bd29745eff
commit 12c073e2ee
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ my $client = HTTP::Tiny->new(
my $resp = $client->get($apiurl);
die "Getting versions failed: HTTP status $resp->{status} (content: $resp->{content})" unless $resp->{success};
my $decoded = decode_json($resp->{content});
my @versions = sort @{$decoded->{versions}};
my @versions = reverse sort @{$decoded->{versions}};
# Keep the most recent 5 versions.
splice(@versions, 0, 5);