From 7c6a42fcb17cf3f03553c16c7a77bdfff6542df6 Mon Sep 17 00:00:00 2001 From: Johannes Edmeier Date: Mon, 4 Dec 2023 15:24:05 +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 0781229..7de1449 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,7 @@ ARG NAME ARG VERSION ARG REVISION ARG ADDITIONAL_BUILD_PARAMS +ARG SKIP_LICENSES_REPORT=false WORKDIR /app diff --git a/Makefile b/Makefile index cdb23d9..a02664e 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 --build-arg ADDITIONAL_BUILD_PARAMS="-cover -covermode=atomic" -t extension-jmeter:latest . + docker build --build-arg ADDITIONAL_BUILD_PARAMS="-cover -covermode=atomic" --build-arg SKIP_LICENSES_REPORT="true" -t extension-jmeter:latest .