From b0b1c1f11d7fba5abbec60e6f9d8d37deddd02b4 Mon Sep 17 00:00:00 2001 From: Jack Zampolin Date: Fri, 13 Jul 2018 13:41:17 -0700 Subject: [PATCH] Update make targets --- CONTRIBUTING.md | 2 +- Dockerfile | 2 +- Makefile | 10 +++++----- README.md | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ffcf87f2..dfe6f7d6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,7 +45,7 @@ software. Since some dependencies are not under our control, a third party may break our build, in which case we can fall back on `dep ensure` (or `make -get-vendor-deps`). Even for dependencies under our control, `dep` helps us to +deps`). Even for dependencies under our control, `dep` helps us to keep multiple repos in sync as they evolve. Anything with an executable, such as apps, tools, and the core, should use `dep`. diff --git a/Dockerfile b/Dockerfile index 069a6493..85ec13fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ RUN apk add --update $PACKAGES COPY . . # Make the binary -RUN make update-tools get-vendor-deps build +RUN make update-tools deps build # Final image FROM alpine:edge diff --git a/Makefile b/Makefile index 8510e60c..5e536a31 100644 --- a/Makefile +++ b/Makefile @@ -24,9 +24,9 @@ ERRCHECK_CHECK := $(shell command -v errcheck 2> /dev/null) UNPARAM_CHECK := $(shell command -v unparam 2> /dev/null) GOCYCLO_CHECK := $(shell command -v gocyclo 2> /dev/null) -all: get-tools get-vendor-deps install +all: tools deps install -ci: get-tools get-vendor-deps install +ci: tools deps install build: ifeq ($(OS),Windows_NT) @@ -45,7 +45,7 @@ update-tools: @echo "Updating golang dependencies" go get -u -v $(DEP) $(GOLINT) $(GOMETALINTER) $(UNCONVERT) $(INEFFASSIGN) $(MISSPELL) $(ERRCHECK) $(UNPARAM) $(GOCYCLO) -get-tools: +tools: ifdef DEP_CHECK @echo "Dep is already installed. Run 'make update-tools' to update." else @@ -101,7 +101,7 @@ get-tools: go get -v $(GOCYCLO) endif -get-vendor-deps: +deps: @rm -rf vendor/ @echo "--> Running dep ensure" @dep ensure -v @@ -115,4 +115,4 @@ docker: docker tag ${DOCKER_IMAGE}:${DOCKER_TAG} ${DOCKER_IMAGE}:latest docker tag ${DOCKER_IMAGE}:${DOCKER_TAG} ${DOCKER_IMAGE}:${COMMIT_HASH} -.PHONY: build install update-tools get-tools get-vendor-deps godocs +.PHONY: build install update-tools tools deps godocs diff --git a/README.md b/README.md index 35c345cc..e9ab4627 100644 --- a/README.md +++ b/README.md @@ -25,10 +25,10 @@ To build, execute the following commands: ```bash # To build the binary and put the results in ./build -$ make get-tools get-vendor-deps build +$ make tools deps build # To build the project and install it in $GOBIN -$ make get-tools get-vendor-deps install +$ make tools deps install ``` ### Community