mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 17:47:03 +00:00
Add Makefile for developer convenience.
This commit is contained in:
@@ -5,13 +5,11 @@ env:
|
|||||||
- DEPLOY_WITH_MAJOR="1.9"
|
- DEPLOY_WITH_MAJOR="1.9"
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- go vet ./...
|
- go get github.com/golang/lint/golint
|
||||||
|
|
||||||
go:
|
go:
|
||||||
- 1.8.x
|
|
||||||
- 1.9.x
|
- 1.9.x
|
||||||
|
- "1.10"
|
||||||
script: go test -race -v ./...
|
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: script
|
provider: script
|
||||||
|
|||||||
35
Makefile
Normal file
35
Makefile
Normal 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}
|
||||||
Reference in New Issue
Block a user