File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -12,22 +12,22 @@ GOMODULE=$(shell grep ^module $(ROOT_DIR)/go.mod | awk '{ print $$2 }')
1212# Set version strings based on git tag and current ref
1313GO_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) '"
1414
15+ # Alias for building program binary
16+ build : $(BINARY )
17+
1518mod-tidy :
1619 go mod tidy
1720
1821# Build our program binary
1922# Depends on GO_FILES to determine when rebuild is needed
2023$(BINARY ) : mod-tidy $(GO_FILES )
21- go build \
24+ CGO_ENABLED=0 go build \
2225 $(GO_LDFLAGS ) \
2326 -o $(BINARY ) \
2427 ./cmd/$(BINARY )
2528
2629.PHONY : build clean image mod-tidy
2730
28- # Alias for building program binary
29- build : $(BINARY )
30-
3131clean :
3232 rm -f $(BINARY )
3333
You can’t perform that action at this time.
0 commit comments