Skip to content

Commit ce9dc58

Browse files
authored
Trim paths from a built artifact (#41)
1 parent 8fa7bca commit ce9dc58

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

makefiles/build.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ BUILD_DIR ?= ./bin
1212
## Build Linux binary
1313
build-linux:
1414
@echo "Building Linux AMD64 binary, GOFLAGS: $(GOFLAGS)"
15-
@GOOS=linux GOARCH=amd64 $(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG)
15+
@GOOS=linux GOARCH=amd64 $(GO) build -trimpath -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG)
1616

1717
## Build binary
1818
build:
1919
@echo "Building binary, GOFLAGS: $(GOFLAGS)"
20-
@$(GO) build -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG)
20+
@$(GO) build -trimpath -ldflags "$(shell bash $(DEVGO_SCRIPTS)/version-ldflags.sh && echo $(BUILD_LDFLAGS))" -o $(BUILD_DIR)/ $(BUILD_PKG)
2121

2222
## Build and run binary
2323
run:

0 commit comments

Comments
 (0)