Skip to content

Commit

Permalink
build: don't run licenses-report locally
Browse files Browse the repository at this point in the history
  • Loading branch information
joshiste committed Dec 4, 2023
1 parent 998db9b commit c659363
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ARG TARGETOS TARGETARCH
ARG NAME
ARG VERSION
ARG REVISION
ARG SKIP_LICENSES_REPORT=false

WORKDIR /app

Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected] save . --save_path ./licenses
go run github.com/google/[email protected] report . > ./licenses/THIRD-PARTY.csv
cp LICENSE ./licenses/LICENSE.txt
endif

# ==================================================================================== #
# QUALITY CONTROL
Expand Down Expand Up @@ -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 .

0 comments on commit c659363

Please sign in to comment.