Update make targets
This commit is contained in:
parent
b823d277c8
commit
b0b1c1f11d
@ -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`.
|
||||
|
||||
|
@ -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
|
||||
|
10
Makefile
10
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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user