@echo "Building in debug mode..."
@$(GOCMD) build -tags "netgo static_build" -installsuffix netgo \
-ldflags "\
- -X $(shell go list).Version=$(VERSION) \
- -X $(shell go list).Commit=$(COMMIT) \
- -X $(shell go list).Build=$(BUILD)" \
+ -X main.Version=$(VERSION) \
+ -X main.Commit=$(COMMIT) \
+ -X main.Build=$(BUILD)" \
.
else
@$(GOCMD) build -tags "netgo static_build" -installsuffix netgo \
-ldflags "-w \
- -X $(shell go list).Version=$(VERSION) \
- -X $(shell go list).Commit=$(COMMIT) \
- -X $(shell go list).Build=$(BUILD)" \
+ -X main.Version=$(VERSION) \
+ -X main.Commit=$(COMMIT) \
+ -X main.Build=$(BUILD)" \
.
endif