Skip to content

Commit

Permalink
remove scanner version flag
Browse files Browse the repository at this point in the history
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
  • Loading branch information
sozercan committed Jan 11, 2024
1 parent f5bf10c commit 327f57d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ GOLANGCI_LINT_VERSION := 1.43.0
PLATFORM ?= linux

# build variables
LDFLAGS ?= $(shell build/version.sh "${VERSION}")
ERASER_LDFLAGS ?= -extldflags=-static $(LDFLAGS) -w
TRIVY_SCANNER_LDFLAGS ?= $(ERASER_LDFLAGS) -X 'main.trivyVersion=v$(TRIVY_BINARY_TAG)'
LDFLAGS ?= -extldflags=-static $(shell build/version.sh "${VERSION}") -w

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down Expand Up @@ -219,7 +217,7 @@ docker-build-trivy-scanner: ## Build docker image for trivy-scanner image.
docker buildx build \
$(_CACHE_FROM) $(_CACHE_TO) \
$(_ATTESTATIONS) \
--build-arg LDFLAGS="$(TRIVY_SCANNER_LDFLAGS)" \
--build-arg LDFLAGS="$(LDFLAGS)" \
--platform="$(PLATFORM)" \
--output=$(OUTPUT_TYPE) \
-t ${TRIVY_SCANNER_IMG} \
Expand All @@ -229,7 +227,7 @@ docker-build-remover: ## Build docker image for remover image.
docker buildx build \
$(_CACHE_FROM) $(_CACHE_TO) \
$(_ATTESTATIONS) \
--build-arg LDFLAGS="$(ERASER_LDFLAGS)" \
--build-arg LDFLAGS="$(LDFLAGS)" \
--platform="$(PLATFORM)" \
--output=$(OUTPUT_TYPE) \
-t ${REMOVER_IMG} \
Expand Down

0 comments on commit 327f57d

Please sign in to comment.