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

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
This commit is contained in:
James Hillyerd
2018-03-09 19:32:45 -08:00
parent f00b9ddef0
commit f8c30a678a
55 changed files with 225 additions and 220 deletions

View File

@@ -1,26 +1,27 @@
PKG := inbucket
SHELL := /bin/sh
SHELL = /bin/sh
SRC := $(shell find . -type f -name '*.go' -not -path "./vendor/*")
PKGS := $$(go list ./... | grep -v /vendor/)
SRC ::= $(shell find . -type f -name '*.go' -not -path "./vendor/*")
PKGS ::= $(shell go list ./... | grep -v /vendor/)
.PHONY: all build clean fmt install lint simplify test
.PHONY: all build clean fmt lint simplify test
all: test lint build
commands ::= client inbucket
all: clean test lint build
$(commands): %: cmd/%
go build ./$<
clean:
go clean
go clean $(PKGS)
rm -f $(commands)
deps:
go get -t ./...
build: clean deps
go build
build: deps $(commands)
install: build
go install
test: clean deps
test: deps
go test -race ./...
fmt:
@@ -31,5 +32,5 @@ simplify:
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}
@golint -set_exit_status $(PKGS)
@go vet $(PKGS)