File tree 2 files changed +2
-10
lines changed
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)
9
9
BUILD_COMMIT ?= $(shell git rev-parse --short HEAD)
10
10
BUILD_TIMESTAMP ?= $(shell date -u '+% Y-% m-% d % H:% M:% S')
11
11
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
-
16
12
PWD = $(shell pwd)
17
13
export PATH := $(PWD ) /bin:$(PATH )
18
14
@@ -21,11 +17,7 @@ download:
21
17
22
18
.PHONY : build
23
19
build :
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
29
21
30
22
.PHONY : docker-build
31
23
docker-build :
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ RUN apt-get update && \
10
10
WORKDIR /build
11
11
COPY . .
12
12
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
14
14
15
15
FROM gcr.io/distroless/static-debian11
16
16
You can’t perform that action at this time.
0 commit comments