2018-07-08 00:14:15 +02:00
|
|
|
.PHONY: test
|
|
|
|
|
2018-09-17 21:32:54 +02:00
|
|
|
export GO111MODULE=on
|
|
|
|
|
2021-10-15 10:35:15 +02:00
|
|
|
GIT_COMMIT ?= $(shell git rev-parse --verify HEAD)
|
|
|
|
GIT_VERSION ?= $(shell git describe --tags --always --dirty="-dev")
|
|
|
|
DATE ?= $(shell date -u '+%Y-%m-%d %H:%M UTC')
|
|
|
|
BUILDER ?= Makefile
|
2022-04-04 15:37:43 +02:00
|
|
|
VERSION_FLAGS := -X "github.com/mgechev/revive/cli.version=$(GIT_VERSION)" -X "github.com/mgechev/revive/cli.date=$(DATE)" -X "github.com/mgechev/revive/cli.commit=$(GIT_COMMIT)" -X "github.com/mgechev/revive/cli.builtBy=$(BUILDER)"
|
2021-10-15 10:35:15 +02:00
|
|
|
|
2018-09-17 21:23:14 +02:00
|
|
|
install:
|
2018-09-17 21:32:54 +02:00
|
|
|
@go mod vendor
|
2018-05-27 01:36:23 +02:00
|
|
|
|
|
|
|
build:
|
2021-10-15 10:35:15 +02:00
|
|
|
@go build -ldflags='$(VERSION_FLAGS)'
|
2018-05-27 01:36:23 +02:00
|
|
|
|
2018-07-08 00:14:15 +02:00
|
|
|
test:
|
2022-04-10 09:06:59 +02:00
|
|
|
@go test -v -race ./...
|
2018-05-27 01:36:23 +02:00
|
|
|
|