Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
78 lines (60 sloc) 1.25 KB
all: build test
deps:
go get -d -v ./go/...
updatedeps:
go get -d -v -u -f ./go/...
testdeps:
go get -d -v -t ./go/...
updatetestdeps:
go get -d -v -t -u -f ./go/...
build: deps
go build ./go/...
install: deps
go install ./go/...
proto:
go get -v go.pedge.io/protoeasy/cmd/protoeasy
go get -v go.pedge.io/pkg/cmd/strip-package-comments
protoeasy --out .
find go -name *\.pb\*\.go | grep -v '^go/vendor' | xargs strip-package-comments
generate:
go generate ./go/...
lint: testdeps
go get -v github.com/golang/lint/golint
for file in $$(find go -name '*.go' | grep -v '^go/internal' | grep -v '\.pb\.go' | grep -v '\.pb\.gw\.go'); do \
golint $$file; \
if [ -n "$$(golint $$file)" ]; then \
exit 1; \
fi; \
done
vet: testdeps
go vet ./go/...
errcheck: testdeps
go get -v github.com/kisielk/errcheck
errcheck ./go/...
pretest: lint vet errcheck
test: pretest
go test ./go/...
clean:
go clean -i ./go/...
docker-build:
docker build -t quay.io/pedge/flightaware-dev .
docker-test: docker-build
docker run quay.io/pedge/flightaware-dev make test
.PHONY: \
all \
deps \
updatedeps \
testdeps \
updatetestdeps \
build \
install \
proto \
generate \
lint \
vet \
errcheck \
pretest \
test \
clean \
docker-build \
docker-test