From c659363e947ad76485eb4f020d19801f12f9278d Mon Sep 17 00:00:00 2001 From: Johannes Edmeier Date: Mon, 4 Dec 2023 15:24:03 +0100 Subject: [PATCH] build: don't run licenses-report locally --- Dockerfile | 1 + Makefile | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d9191a2..59739e8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,7 @@ ARG TARGETOS TARGETARCH ARG NAME ARG VERSION ARG REVISION +ARG SKIP_LICENSES_REPORT=false WORKDIR /app diff --git a/Makefile b/Makefile index a1c44bb..423e3ed 100755 --- a/Makefile +++ b/Makefile @@ -11,10 +11,16 @@ help: ## licenses-report: generate a report of all licenses .PHONY: licenses-report licenses-report: +ifeq ($(SKIP_LICENSES_REPORT), true) + @echo "Skipping licenses report" + rm -rf ./licenses && mkdir -p ./licenses +else + @echo "Generating licenses report" rm -rf ./licenses go run github.com/google/go-licenses@v1.6.0 save . --save_path ./licenses go run github.com/google/go-licenses@v1.6.0 report . > ./licenses/THIRD-PARTY.csv cp LICENSE ./licenses/LICENSE.txt +endif # ==================================================================================== # # QUALITY CONTROL @@ -66,4 +72,4 @@ run: tidy build ## container: build the container image .PHONY: container container: - docker build -t extension-prometheus:latest . + docker build --build-arg SKIP_LICENSES_REPORT="true" -t extension-prometheus:latest .