1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 09:37:02 +00:00
Files
go-inbucket/Makefile
James Hillyerd f8c30a678a Reorganize packages, closes #79
- All packages go into either cmd or pkg directories
- Most packages renamed
- Server packages moved into pkg/server
- sanitize moved into webui, as that's the only place it's used
- filestore moved into pkg/storage/file
- Makefile updated, and PKG variable use fixed
2018-03-10 12:04:13 -08:00

37 lines
633 B
Makefile

SHELL = /bin/sh
SRC ::= $(shell find . -type f -name '*.go' -not -path "./vendor/*")
PKGS ::= $(shell go list ./... | grep -v /vendor/)
.PHONY: all build clean fmt lint simplify test
commands ::= client inbucket
all: clean test lint build
$(commands): %: cmd/%
go build ./$<
clean:
go clean $(PKGS)
rm -f $(commands)
deps:
go get -t ./...
build: deps $(commands)
test: 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)