1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 09:37:02 +00:00

Add Makefile for developer convenience.

This commit is contained in:
James Hillyerd
2018-02-27 20:41:45 -08:00
parent 3b9af85924
commit 3c19e0820b
2 changed files with 37 additions and 4 deletions

View File

@@ -5,13 +5,11 @@ env:
- DEPLOY_WITH_MAJOR="1.9"
before_script:
- go vet ./...
- go get github.com/golang/lint/golint
go:
- 1.8.x
- 1.9.x
script: go test -race -v ./...
- "1.10"
deploy:
provider: script

35
Makefile Normal file
View File

@@ -0,0 +1,35 @@
PKG := inbucket
SHELL := /bin/sh
SRC := $(shell find . -type f -name '*.go' -not -path "./vendor/*")
PKGS := $$(go list ./... | grep -v /vendor/)
.PHONY: all build clean fmt install lint simplify test
all: test lint build
clean:
go clean
deps:
go get -t ./...
build: clean deps
go build
install: build
go install
test: clean deps
go test -race ./...
fmt:
@gofmt -l -w $(SRC)
simplify:
@gofmt -s -l -w $(SRC)
lint:
@test -z "$(shell gofmt -l . | tee /dev/stderr)" || echo "[WARN] Fix formatting issues with 'make fmt'"
@golint -set_exit_status $${PKGS}
@go vet $${PKGS}