build: only build static release binaries
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
This commit is contained in:
parent
5f58d8e7d2
commit
c765e268d8
1 changed files with 2 additions and 1 deletions
3
Makefile
3
Makefile
|
@ -18,7 +18,7 @@ group=$(shell id -g -n)
|
||||||
|
|
||||||
export GOBIN=$(PWD)/bin
|
export GOBIN=$(PWD)/bin
|
||||||
|
|
||||||
LD_FLAGS="-w -X main.version=$(VERSION) -extldflags \"-static\""
|
LD_FLAGS="-w -X main.version=$(VERSION)"
|
||||||
|
|
||||||
# Dependency versions
|
# Dependency versions
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@ bin/example-app:
|
||||||
@cd examples/ && go install -v -ldflags $(LD_FLAGS) $(REPO_PATH)/examples/example-app
|
@cd examples/ && go install -v -ldflags $(LD_FLAGS) $(REPO_PATH)/examples/example-app
|
||||||
|
|
||||||
.PHONY: release-binary
|
.PHONY: release-binary
|
||||||
|
release-binary: LD_FLAGS = "-w -X main.version=$(VERSION) -extldflags \"-static\""
|
||||||
release-binary: generate
|
release-binary: generate
|
||||||
@go build -o /go/bin/dex -v -ldflags $(LD_FLAGS) $(REPO_PATH)/cmd/dex
|
@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
|
@go build -o /go/bin/docker-entrypoint -v -ldflags $(LD_FLAGS) $(REPO_PATH)/cmd/docker-entrypoint
|
||||||
|
|
Reference in a new issue