From 102762062b6b8f211bbd94b8a7ed016f8695db9e Mon Sep 17 00:00:00 2001 From: Mark Sagi-Kazar Date: Tue, 8 Feb 2022 23:55:31 +0100 Subject: [PATCH] build: only build static release binaries Signed-off-by: Mark Sagi-Kazar --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b4f9ed12..32cb9cc5 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ group=$(shell id -g -n) export GOBIN=$(PWD)/bin -LD_FLAGS="-w -X main.version=$(VERSION) -extldflags \"-static\"" +LD_FLAGS="-w -X main.version=$(VERSION)" # Dependency versions @@ -46,6 +46,7 @@ bin/example-app: @cd examples/ && go install -v -ldflags $(LD_FLAGS) $(REPO_PATH)/examples/example-app .PHONY: release-binary +release-binary: LD_FLAGS = "-w -X main.version=$(VERSION) -extldflags \"-static\"" release-binary: generate @go build -o /go/bin/dex -v -ldflags $(LD_FLAGS) $(REPO_PATH)/cmd/dex @go build -o /go/bin/docker-entrypoint -v -ldflags $(LD_FLAGS) $(REPO_PATH)/cmd/docker-entrypoint