micro-gen/Makefile
Vasiliy Tolstov f902777e5b update
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2024-09-26 19:44:12 +03:00

13 lines
490 B
Makefile

DATE?=$(shell date -u "+%Y-%m-%d %H:%M:%S")
LDFLAGS=-s -w -X 'main.AppVersion=${app_version}' -X 'main.BuildDate=${DATE}'
LDFLAGS=-X 'main.AppVersion=${app_version}' -X 'main.BuildDate=${DATE}'
GOPATH=$(shell go env GOPATH)
.PHONY: build
build:
GOWORK=off CGO_ENABLED=0 go build -ldflags "$(LDFLAGS)" -gcflags=-trimpath=$(GOPATH) -asmflags=-trimpath=$(GOPATH) -trimpath -mod=readonly -o micro-gen go.unistack.org/micro-gen
.PHONY: test
test:
go test -mod=readonly -race -v ./... -cover