From 546c3e4a92f17115bfe6ab978f89a15820561869 Mon Sep 17 00:00:00 2001 From: Caleb Xu Date: Tue, 5 Aug 2025 14:51:36 -0400 Subject: [PATCH] Add -trimpath flag and -s -w ldflags on builds Signed-off-by: Caleb Xu --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index d581cc5..c5e4575 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,9 @@ run: .PHONY: bin build bin build: CGO_ENABLED=0 go build -o $(BIN_NAME) \ + -trimpath \ -ldflags "\ + -s -w \ -X github.com/opdev/discover-workload/internal/version.Commit=$(COMMIT) \ -X github.com/opdev/discover-workload/internal/version.Version=$(BIN_VERSION)" \ internal/cmd/main/discover-workload.go