forked from heroku/docker-registry-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (19 loc) · 635 Bytes
/
Copy pathMakefile
File metadata and controls
27 lines (19 loc) · 635 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
GO_FILES := $(shell find . -type f -name '*.go' -not -path "./vendor/*")
GO_PACKAGES := $(shell go list ./... | sed "s/github.com\/heroku\/docker-registry-client/./" | grep -v "^./vendor/")
build:
go build -v $(GO_PACKAGES)
travis: tidy test
test: build
go fmt $(GO_PACKAGES)
go test -race -i $(GO_PACKAGES)
go test -race -v $(GO_PACKAGES)
# Setup & Code Cleanliness
setup: hooks tidy
hooks:
ln -fs ../../bin/git-pre-commit.sh .git/hooks/pre-commit
tidy: goimports
test -z "$$(goimports -l -d $(GO_FILES) | tee /dev/stderr)"
go vet $(GO_PACKAGES)
precommit: tidy test
goimports:
go get golang.org/x/tools/cmd/goimports