build: only build static release binaries

Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
This commit is contained in:
Mark Sagi-Kazar 2022-02-08 23:55:31 +01:00
parent 5f58d8e7d2
commit c765e268d8
No known key found for this signature in database
GPG key ID: 31AB0439F4C5C90E

View file

@ -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