mirror of
https://github.com/Icinga/icingadb.git
synced 2026-05-28 04:35:54 -04:00
.github/workflows/compliance/ls-deps.pl: extract all 3rd-party deps
... from `go list -deps` input.
This commit is contained in:
parent
94abcef7bf
commit
12a6d525e1
1 changed files with 24 additions and 0 deletions
24
.github/workflows/compliance/ls-deps.pl
vendored
Executable file
24
.github/workflows/compliance/ls-deps.pl
vendored
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
use autodie qw(:all);
|
||||
|
||||
my @mods = <>;
|
||||
chomp @mods;
|
||||
s~^vendor/~~ for @mods;
|
||||
|
||||
@mods = grep m~^[^./]+\.~, @mods;
|
||||
@mods = grep !m~^golang\.org/x(?:/|$)~, @mods;
|
||||
@mods = grep !m~^github\.com/icinga/icingadb(?:/|$)~, @mods;
|
||||
@mods = sort @mods;
|
||||
|
||||
my $lastMod = undef;
|
||||
|
||||
for (@mods) {
|
||||
# prefixed with last mod (e.g. "go.uber.org/zap/buffer" after "go.uber.org/zap"), so redundant
|
||||
next if defined($lastMod) && /$lastMod/;
|
||||
|
||||
$lastMod = '^' . quotemeta("$_/");
|
||||
print "$_\n"
|
||||
}
|
||||
Loading…
Reference in a new issue