diff options
| author | Ailin Nemui | 2017-03-14 23:27:18 +0100 |
|---|---|---|
| committer | Ailin Nemui | 2017-03-14 23:27:30 +0100 |
| commit | 43ec4348ea43312073cd48312278812b63e4f850 (patch) | |
| tree | 61919d1d6c03a12fdb78b5d10ee926705d5496b8 /_testing | |
| parent | 2ea55586c7a5a90b30a9e5b7c40da5b95bc046d7 (diff) | |
| download | scripts.irssi.org-43ec4348ea43312073cd48312278812b63e4f850.tar.bz2 | |
autocommit script commands
Diffstat (limited to '_testing')
| -rw-r--r-- | _testing/_irssi_test.pl | 4 | ||||
| -rw-r--r-- | _testing/travis/update-scripts-yaml.pl | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/_testing/_irssi_test.pl b/_testing/_irssi_test.pl index e31a184..462d86b 100644 --- a/_testing/_irssi_test.pl +++ b/_testing/_irssi_test.pl @@ -49,7 +49,7 @@ my @modules = grep { && !Module::CoreList->first_release($_) } sort keys %{ $prereq_results->as_string_hash }; -my (%info, $version); +my (%info, $version, @commands); unless (defined $package) { my %fail = (failed => 1, name => $CURRENT_SCRIPT); $fail{modules} = \@modules if @modules; @@ -68,6 +68,7 @@ unless (defined $package) { else { %info = do { no strict 'refs'; %{"Irssi::Script::${package}IRSSI"} }; $version = do { no strict 'refs'; ${"Irssi::Script::${package}VERSION"} }; + @commands = sort map { $_->{cmd} } grep { $_->{category} eq "Perl scripts' commands" } Irssi::commands; } delete $info{''}; for my $rb (keys %info) { @@ -94,5 +95,6 @@ if ($loginfo) { $info{modified} = "$date $time"; } $info{modules} = \@modules if @modules; +$info{commands} = \@commands if @commands; $info{default_package} = $package =~ s/::$//r if $package; YAML::Tiny::DumpFile("info.yml", [\%info]); diff --git a/_testing/travis/update-scripts-yaml.pl b/_testing/travis/update-scripts-yaml.pl index 0ed52ac..29925a3 100644 --- a/_testing/travis/update-scripts-yaml.pl +++ b/_testing/travis/update-scripts-yaml.pl @@ -46,6 +46,10 @@ for my $file (<scripts/*.pl>) { $newmeta{$filename}{modules} = join ' ', @$modules if 'ARRAY' eq ref $modules; + my $commands = delete $newmeta{$filename}{commands}; + $newmeta{$filename}{commands} + = join ' ', grep { !/ / } @$commands + if 'ARRAY' eq ref $commands; } elsif (exists $oldmeta{$filename}) { print "META-INF FOR $base NOT FOUND\n"; |
