test me pls
This commit is contained in:
17
Makefile
17
Makefile
@@ -1,22 +1,24 @@
|
||||
|
||||
export DOCKER_BUILDKIT := 1
|
||||
GOPATH := $(shell go env GOPATH)
|
||||
export PATH := $(PATH):$(GOPATH)/bin
|
||||
PROTOC_GEN_GO := $(GOPATH)/bin/protoc-gen-go
|
||||
|
||||
ARCH := $(shell uname -m)
|
||||
GITREV := $(shell git describe --always --dirty=-dirty)
|
||||
APPNAME := mfer
|
||||
export DOCKER_IMAGE_CACHE_DIR := $(HOME)/Library/Caches/Docker/$(APPNAME)-$(ARCH)
|
||||
|
||||
GOLDFLAGS += -X main.Version=0.1.0
|
||||
GOLDFLAGS += -X main.Gitrev=$(GITREV)
|
||||
GOFLAGS := -ldflags "$(GOLDFLAGS)"
|
||||
|
||||
default: run
|
||||
default: test
|
||||
|
||||
run: ./mfer.cmd
|
||||
./$<
|
||||
./$< gen --ignore-dotfiles
|
||||
|
||||
test:
|
||||
test: fmt
|
||||
go test -v --timeout 3s ./...
|
||||
|
||||
$(PROTOC_GEN_GO):
|
||||
@@ -29,7 +31,7 @@ devprereqs:
|
||||
which gofumpt || go install -v mvdan.cc/gofumpt@latest
|
||||
which golangci-lint || go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
||||
|
||||
mfer.cmd: $(PROTOC_GEN_GO) mfer/*.go internal/*/*.go cmd/*/*.go
|
||||
mfer.cmd: mfer/*.go internal/*/*.go cmd/*/*.go
|
||||
protoc --version
|
||||
cd mfer && go generate .
|
||||
make test
|
||||
@@ -48,5 +50,10 @@ lint:
|
||||
golangci-lint run
|
||||
sh -c 'test -z "$$(gofmt -l .)"'
|
||||
|
||||
dockerbuild:
|
||||
docker:
|
||||
bash -x bin/docker-prereqs.sh
|
||||
docker build .
|
||||
|
||||
godoc:
|
||||
open http://127.0.0.1:6060
|
||||
godoc -http=:6060
|
||||
|
||||
Reference in New Issue
Block a user