From 1de4034565a9cce5be0ba5de740a41f0d4729f58 Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Thu, 28 Sep 2023 11:07:38 -0400 Subject: [PATCH] fix(ci): statically compile binaries Signed-off-by: Chris Gianelloni --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dc96c61..878cdf8 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ BINARIES=$(shell cd $(ROOT_DIR)/cmd && ls -1 | grep -v ^common) GOMODULE=$(shell grep ^module $(ROOT_DIR)/go.mod | awk '{ print $$2 }') # Set version strings based on git tag and current ref -GO_LDFLAGS=-ldflags "-X '$(GOMODULE)/internal/version.Version=$(shell git describe --tags --exact-match 2>/dev/null)' -X '$(GOMODULE)/internal/version.CommitHash=$(shell git rev-parse --short HEAD)'" +GO_LDFLAGS=-ldflags "-s -w -X '$(GOMODULE)/internal/version.Version=$(shell git describe --tags --exact-match 2>/dev/null)' -X '$(GOMODULE)/internal/version.CommitHash=$(shell git rev-parse --short HEAD)'" .PHONY: build mod-tidy clean test