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 List::Util qw(first);
|
||||
use Clone qw(clone);
|
||||
use LWP::UserAgent;
|
||||
|
||||
sub get_deps {
|
||||
my ($config, %fdeps) = @_;
|
||||
@ -413,6 +414,7 @@ while (1) {
|
||||
$changed_deps ? (T => "Tag new release") : (),
|
||||
@operations ? (A => "Apply changes") : (),
|
||||
R => "Refresh repositiories",
|
||||
H => "What release to Hex",
|
||||
E => "Exit");
|
||||
last if $cmd eq "E";
|
||||
|
||||
@ -441,6 +443,16 @@ while (1) {
|
||||
if ($cmd eq "R") {
|
||||
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") {
|
||||
while (1) {
|
||||
my @deps_to_tag;
|
||||
|
Loading…
Reference in New Issue
Block a user