cms-template/Makefile
Vasiliy Tolstov 973f9ac822
Some checks failed
build / test (push) Failing after 5s
build / lint (push) Failing after 6s
initial import
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2024-09-26 19:45:39 +03:00

21 lines
594 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 bin/cms-template
.PHONY: test
test:
go test -mod=readonly -race -v ./... -cover
.PHONY: generate
generate:
go generate ./...
.PHONY: docker
docker:
docker build -v $(CURDIR):/build -t cms-template .