* Fix two small compiler errors Apparently, in go, `fmt.Prntln("\n")` is a build error - you can't have a redundant newline there. Also, we had the wrong format string somewhere. * Use $GOPATH to find dep When I first pulled this branch, all the tests failed because, although `dep` was being installed to my local machine, it wasn't being added to $PATH. Rather than mess with $PATH, I decided to add $GOPATH/bin to the beginning of the invocation.
35 lines
637 B
Makefile
35 lines
637 B
Makefile
BIN = die
|
|
|
|
all: clean build
|
|
|
|
run: build
|
|
./build/$(BIN)
|
|
|
|
build: deps
|
|
go build -o build/$(BIN) ./cmd/...
|
|
|
|
install: deps
|
|
go install ./...
|
|
|
|
deps:
|
|
command -v dep >/dev/null || go get -u github.com/golang/dep/cmd/dep
|
|
$(GOPATH)/bin/dep ensure
|
|
|
|
test: build
|
|
@! git grep tcell -- ':!tui/' ':!Gopkg.lock' ':!Gopkg.toml' ':!Makefile'
|
|
go test -v ./...
|
|
|
|
lint: lintdeps build
|
|
golint -set_exit_status $$(go list ./... | grep -v /vendor/)
|
|
|
|
lintdeps:
|
|
go get -d -v -t ./...
|
|
command -v golint >/dev/null || go get -u github.com/golang/lint/golint
|
|
|
|
clean:
|
|
rm -rf build
|
|
rm -rf vendor
|
|
go clean
|
|
|
|
.PHONY: build install deps test lint lintdeps clean
|