File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,6 @@ BUILD_VERSION ?= $(shell git branch --show-current)
99BUILD_COMMIT ?= $(shell git rev-parse --short HEAD)
1010BUILD_TIMESTAMP ?= $(shell date -u '+% Y-% m-% d % H:% M:% S')
1111
12- GOLDFLAGS += -X 'stackitcloud/external-dns-stackit-webhook/internal/version.buildVersion=$(BUILD_VERSION ) '
13- GOLDFLAGS += -X 'stackitcloud/external-dns-stackit-webhook/version.buildCommit=$(BUILD_COMMIT ) '
14- GOLDFLAGS += -X 'stackitcloud/external-dns-stackit-webhook/internal/version.buildTimestamp=$(BUILD_TIMESTAMP ) '
15-
1612PWD = $(shell pwd)
1713export PATH := $(PWD ) /bin:$(PATH )
1814
@@ -21,11 +17,7 @@ download:
2117
2218.PHONY : build
2319build :
24- CGO_ENABLED=0 go build -ldflags " $( GOLDFLAGS) " -o ./bin/external-dns-stackit-webhook -v cmd/webhook/main.go
25-
26- .PHONY : build-amd64
27- build-amd64 :
28- GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags " $( GOLDFLAGS) " -o ./bin/external-dns-stackit-webhook -v cmd/webhook/main.go
20+ CGO_ENABLED=0 go build -ldflags " -s -w" -o ./bin/external-dns-stackit-webhook -v cmd/webhook/main.go
2921
3022.PHONY : docker-build
3123docker-build :
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ RUN apt-get update && \
1010WORKDIR /build
1111COPY . .
1212
13- RUN make build-amd64
13+ RUN CGO_ENABLED=0 go build -ldflags "-s -w" -o ./bin/external-dns-stackit-webhook -v cmd/webhook/main.go
1414
1515FROM gcr.io/distroless/static-debian11
1616
You can’t perform that action at this time.
0 commit comments