forked from docker/go-plugins-helpers
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (24 loc) · 640 Bytes
/
Copy pathMakefile
File metadata and controls
33 lines (24 loc) · 640 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.PHONY: all test test-local install-deps lint fmt vet
REPO_NAME = go-plugins-helpers
REPO_OWNER = docker
PKG_NAME = github.com/${REPO_OWNER}/${REPO_NAME}
IMAGE = golang:1.16
all: test
test-local: install-deps fmt lint vet
@echo "+ $@"
@go test -v ./...
test:
@docker run -e GO111MODULE=off -v ${shell pwd}:/go/src/${PKG_NAME} -w /go/src/${PKG_NAME} ${IMAGE} make test-local
install-deps:
@echo "+ $@"
@go get -u golang.org/x/lint/golint
@go get -d -t ./...
lint:
@echo "+ $@"
@test -z "$$(golint ./... | tee /dev/stderr)"
fmt:
@echo "+ $@"
@test -z "$$(gofmt -s -l . | tee /dev/stderr)"
vet:
@echo "+ $@"
@go vet ./...