mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Add option to check for missing hex releases to update script
This commit is contained in:
parent
9c221848d7
commit
cb6322a3a7
@ -15,6 +15,7 @@ use Term::ANSIColor;
|
|||||||
use Term::ReadKey;
|
use Term::ReadKey;
|
||||||
use List::Util qw(first);
|
use List::Util qw(first);
|
||||||
use Clone qw(clone);
|
use Clone qw(clone);
|
||||||
|
use LWP::UserAgent;
|
||||||
|
|
||||||
sub get_deps {
|
sub get_deps {
|
||||||
my ($config, %fdeps) = @_;
|
my ($config, %fdeps) = @_;
|
||||||
@ -413,6 +414,7 @@ while (1) {
|
|||||||
$changed_deps ? (T => "Tag new release") : (),
|
$changed_deps ? (T => "Tag new release") : (),
|
||||||
@operations ? (A => "Apply changes") : (),
|
@operations ? (A => "Apply changes") : (),
|
||||||
R => "Refresh repositiories",
|
R => "Refresh repositiories",
|
||||||
|
H => "What release to Hex",
|
||||||
E => "Exit");
|
E => "Exit");
|
||||||
last if $cmd eq "E";
|
last if $cmd eq "E";
|
||||||
|
|
||||||
@ -441,6 +443,16 @@ while (1) {
|
|||||||
if ($cmd eq "R") {
|
if ($cmd eq "R") {
|
||||||
update_deps_repos(1);
|
update_deps_repos(1);
|
||||||
}
|
}
|
||||||
|
if ($cmd eq "H") {
|
||||||
|
my $ua = LWP::UserAgent->new();
|
||||||
|
for my $dep (sort keys %$top_deps) {
|
||||||
|
say "checking https://hex.pm/packages/$dep/$git_info->{$dep}->{last_tag}";
|
||||||
|
my $res = $ua->head("https://hex.pm/packages/$dep/$git_info->{$dep}->{last_tag}");
|
||||||
|
if ($res->code == 404) {
|
||||||
|
say color("red"), "$dep", color("reset"), " ($top_deps->{$dep}->{commit})";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if ($cmd eq "T") {
|
if ($cmd eq "T") {
|
||||||
while (1) {
|
while (1) {
|
||||||
my @deps_to_tag;
|
my @deps_to_tag;
|
||||||
|
Loading…
Reference in New Issue
Block a user