diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:36:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:36:04 +0000 |
commit | b09c6d56832eb1718c07d74abf3bc6ae3fe4e030 (patch) | |
tree | d2caec2610d4ea887803ec9e9c3cd77136c448ba /.github/workflows/compliance/ls-deps.pl | |
parent | Initial commit. (diff) | |
download | icingadb-405d395da7d7b4c1dc44200efac604bcd75f5b9a.tar.xz icingadb-405d395da7d7b4c1dc44200efac604bcd75f5b9a.zip |
Adding upstream version 1.1.0.upstream/1.1.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.github/workflows/compliance/ls-deps.pl')
-rwxr-xr-x | .github/workflows/compliance/ls-deps.pl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/.github/workflows/compliance/ls-deps.pl b/.github/workflows/compliance/ls-deps.pl new file mode 100755 index 0000000..a7a033a --- /dev/null +++ b/.github/workflows/compliance/ls-deps.pl @@ -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" +} |