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 d0bf86a commit c094bf5
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 @@ -8,6 +8,7 @@ FROM --platform=$BUILDPLATFORM goreleaser/goreleaser:v1.22.1 AS build
ARG TARGETOS TARGETARCH
ARG BUILD_WITH_COVERAGE
ARG BUILD_SNAPSHOT=true
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/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
Expand Down Expand Up @@ -65,7 +71,7 @@ run: tidy build
## container: build the container image
.PHONY: container
container:
docker buildx build --build-arg BUILD_WITH_COVERAGE="true" -t extension-dynatrace:latest --output=type=docker .
docker buildx build --build-arg BUILD_WITH_COVERAGE="true" --build-arg SKIP_LICENSES_REPORT="true" -t extension-dynatrace:latest --output=type=docker .

## linuxpkg: build the linux packages
.PHONY: linuxpkg
Expand Down

0 comments on commit c094bf5

Please sign in to comment.