1
0
mirror of https://github.com/mgechev/revive.git synced 2024-11-21 17:16:40 +02:00
revive/Makefile

20 lines
562 B
Makefile
Raw Normal View History

.PHONY: test
2018-09-17 21:32:54 +02:00
export GO111MODULE=on
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
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)"
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:
@go build -ldflags='$(VERSION_FLAGS)'
2018-05-27 01:36:23 +02:00
test:
2022-04-10 09:06:59 +02:00
@go test -v -race ./...
2018-05-27 01:36:23 +02:00