From bec36f7ba88f326f3a53c0f98d5e29434e0c791c Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Tue, 16 Jan 2024 11:34:44 +0200 Subject: [PATCH] Makefile: fix report-licenses target Signed-off-by: Markus Lehtonen --- Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Makefile b/Makefile index f34c19ec4..f8324e482 100644 --- a/Makefile +++ b/Makefile @@ -16,8 +16,6 @@ SHELL := /bin/bash # Kubernetes version we pull in as modules and our external API versions. KUBERNETES_VERSION := $(shell grep 'k8s.io/kubernetes ' go.mod | sed 's/^.* //') -# Directories (in cmd) with go code we'll want to create Docker images from. -IMAGE_DIRS = $(shell find cmd -name Dockerfile | sed 's:cmd/::g;s:/.*::g' | uniq) IMAGE_VERSION := $(shell git describe --dirty 2> /dev/null || echo v0.0.0-unknown) ifdef IMAGE_REPO override IMAGE_REPO := $(IMAGE_REPO)/ @@ -392,9 +390,7 @@ install-ginkgo: report-licenses: $(Q)mkdir -p $(LICENSE_PATH) && \ - for cmd in $(IMAGE_DIRS); do \ - LICENSE_PKGS="$$LICENSE_PKGS ./cmd/$$cmd"; \ - done && \ + LICENSE_PKGS=`find ./cmd -name Dockerfile | xargs -l dirname`; \ go-licenses report $$LICENSE_PKGS \ --ignore github.com/containers/nri-plugins \ > $(LICENSE_PATH)/licenses.csv && \