summaryrefslogtreecommitdiff
path: root/dependencies/analyses/dependency-tree.sh
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2019-07-12 11:35:48 +0200
committerValentin Rothberg <rothberg@redhat.com>2019-07-16 14:16:16 +0200
commit25d63f009dfb0bd646b761591a08989cfd9d4fda (patch)
tree5e3f087177553f2c2c5dbe5654d5b6e488380e15 /dependencies/analyses/dependency-tree.sh
parent9ae3e7c1eced61253330c2c8bd93d51ee97a6774 (diff)
downloadpodman-25d63f009dfb0bd646b761591a08989cfd9d4fda.tar.gz
podman-25d63f009dfb0bd646b761591a08989cfd9d4fda.tar.bz2
podman-25d63f009dfb0bd646b761591a08989cfd9d4fda.zip
dependency-tree analysis: direct and transitive
Change the script to generate two files. One including direct dependencies, the other including direct and transitive dependencies. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'dependencies/analyses/dependency-tree.sh')
-rwxr-xr-xdependencies/analyses/dependency-tree.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/dependencies/analyses/dependency-tree.sh b/dependencies/analyses/dependency-tree.sh
index 3c9dccc51..9a2e3282d 100755
--- a/dependencies/analyses/dependency-tree.sh
+++ b/dependencies/analyses/dependency-tree.sh
@@ -10,4 +10,11 @@ DATA=$(go list $1/... \
| awk '{ printf "%s\n\n", $0 }' \
)
-echo "$DATA"
+echo "$DATA" > direct-tree.txt
+
+DATA=$(go list $1/... \
+ | xargs -d '\n' go list -f '{{ .ImportPath }}: {{ join .Deps ", " }}' \
+ | awk '{ printf "%s\n\n", $0 }' \
+ )
+
+echo "$DATA" > transitive-tree.txt