File: Makefile

package info (click to toggle)
golang-github-docker-go-plugins-helpers 0.20211224-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 280 kB
  • sloc: makefile: 29
file content (33 lines) | stat: -rw-r--r-- 640 bytes parent folder | download
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
33
.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 ./...