2020-10-12 19:37:06 +00:00
|
|
|
PACKAGES=$(shell go list ./... | grep -v /vendor/)
|
|
|
|
REVISION=$(shell git rev-parse HEAD)
|
|
|
|
DEBUG=0
|
|
|
|
|
|
|
|
ifeq ($(DEBUG),1)
|
|
|
|
D =
|
|
|
|
else
|
|
|
|
D = @
|
|
|
|
endif
|
|
|
|
|
|
|
|
all: build
|
|
|
|
|
|
|
|
protos:
|
|
|
|
$(D)protobuild --quiet ${PACKAGES}
|
|
|
|
|
|
|
|
build:
|
|
|
|
$(D)CGO_ENABLED=0 go build -v -ldflags '-extldflags "-static"' .
|
2021-01-05 20:58:15 +00:00
|
|
|
|
|
|
|
update:
|
|
|
|
go get -u ./... && \
|
|
|
|
go mod tidy && \
|
|
|
|
go mod vendor
|
|
|
|
|