Skip to content

Commit 457cad5

Browse files
author
CodingWizKid
committed
adjust release
1 parent 5f7a4b0 commit 457cad5

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

Makefile

+1-9
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ BUILD_VERSION ?= $(shell git branch --show-current)
99
BUILD_COMMIT ?= $(shell git rev-parse --short HEAD)
1010
BUILD_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-
1612
PWD = $(shell pwd)
1713
export PATH := $(PWD)/bin:$(PATH)
1814

@@ -21,11 +17,7 @@ download:
2117

2218
.PHONY: build
2319
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
2921

3022
.PHONY: docker-build
3123
docker-build:

build/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ RUN apt-get update && \
1010
WORKDIR /build
1111
COPY . .
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

1515
FROM gcr.io/distroless/static-debian11
1616

0 commit comments

Comments
 (0)