Skip to content
This repository was archived by the owner on Jan 21, 2020. It is now read-only.

Commit 13bd231

Browse files
jalateraswfarner
authored andcommitted
make: add goal to install required tools (#322)
Signed-off-by: Jim Alateras <[email protected]>
1 parent f57fa10 commit 13bd231

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ifeq (${DISABLE_OPTIMIZATION},true)
1111
VERSION:="$(VERSION)-noopt"
1212
endif
1313

14-
.PHONY: clean all fmt vet lint build test vendor-update containers check-docs tutorial-test
14+
.PHONY: clean all fmt vet lint build test vendor-update containers check-docs tutorial-test get-tools
1515
.DEFAULT: all
1616
all: clean fmt vet lint build test binaries
1717

@@ -37,6 +37,12 @@ build-in-container: clean
3737
-v ${CURDIR}/build:/go/src/github.com/docker/infrakit/build \
3838
infrakit-build
3939

40+
get-tools:
41+
@echo "+ $@"
42+
@go get -u \
43+
github.com/golang/lint/golint \
44+
github.com/wfarner/blockcheck
45+
4046
vet:
4147
@echo "+ $@"
4248
@go vet $(PKGS)
@@ -53,7 +59,7 @@ fmt-save:
5359
lint:
5460
@echo "+ $@"
5561
$(if $(shell which golint || echo ''), , \
56-
$(error Please install golint: `go get -u github.com/golang/lint/golint`))
62+
$(error Please install golint: `make get-tools`))
5763
@test -z "$$(golint ./... 2>&1 | grep -v ^vendor/ | grep -v mock/ | tee /dev/stderr)"
5864

5965
check-docs:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ We recommended go version 1.7.1 or greater for all platforms.
5454

5555
Also install a few build tools:
5656
```shell
57-
go get -u github.com/golang/lint/golint github.com/wfarner/blockcheck # if you're running tests
57+
make get-tools
5858
```
5959

6060
### Running tests

0 commit comments

Comments
 (0)