Due to https://github.com/golang/go/issues/12294, our Travis jobs are failing with pkg/compiler/binder/stmtexpr.go:160: no formatting directive in Errorf call etc, etc. Perplexingly, this is supposedly fixed as of Go 1.7.5, and we are running Go 1.8.2 in Travis. However, vet is a separate binary tool, so it seems either (1) Go's Linux distro doesn't contain the right version or (2) Travis's image doesn't contain the right version. I have to imagine (2) is more likely, except that I can't actually look at the machine (and go vet doesn't have a version)! For now, we will just skip the -printf checks.
39 lines
907 B
Makefile
39 lines
907 B
Makefile
.PHONY: banner build install lint lint_quiet test vet
|
|
|
|
PROJECT=github.com/pulumi/lumi
|
|
PROJECT_PKGS=$(shell go list ./... | grep -v /vendor/)
|
|
|
|
default: banner test lint_quiet vet install
|
|
|
|
banner:
|
|
@go version
|
|
|
|
build:
|
|
@echo "\033[0;32mBUILD:\033[0m"
|
|
@go build ${PROJECT}/cmd/lumi
|
|
@go build ${PROJECT}/cmd/lumidl
|
|
|
|
install:
|
|
@echo "\033[0;32mINSTALL:\033[0m"
|
|
@go install ${PROJECT}/cmd/lumi
|
|
@go install ${PROJECT}/cmd/lumidl
|
|
|
|
lint:
|
|
@echo "\033[0;32mLINT:\033[0m"
|
|
@golint cmd/...
|
|
@golint pkg/...
|
|
|
|
lint_quiet:
|
|
@echo "\033[0;32mLINT (quiet):\033[0m"
|
|
@echo "`golint cmd/... | grep -v "or be unexported"`"
|
|
@echo "`golint pkg/... | grep -v "or be unexported"`"
|
|
@echo "\033[0;33mgolint was run quietly; to run with noisy errors, run 'make lint'\033[0m"
|
|
|
|
test:
|
|
@echo "\033[0;32mTEST:\033[0m"
|
|
@go test -cover ${PROJECT_PKGS}
|
|
|
|
vet:
|
|
@echo "\033[0;32mVET:\033[0m"
|
|
@go tool vet -printf=false cmd/ lib/ pkg/
|
|
|