Update Makefile.common

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
Simon Pasquier 2019-03-13 09:14:47 +01:00
parent c5e14697ea
commit a2c4da068f
2 changed files with 11 additions and 8 deletions

View File

@ -20,13 +20,8 @@ STATICCHECK_IGNORE = \
github.com/prometheus/client_golang/prometheus/promhttp/instrument_server_test.go:SA1019 \ github.com/prometheus/client_golang/prometheus/promhttp/instrument_server_test.go:SA1019 \
github.com/prometheus/client_golang/prometheus/http.go:SA1019 github.com/prometheus/client_golang/prometheus/http.go:SA1019
.PHONY: get_dep
get_dep:
@echo ">> getting dependencies"
$(GO) get -t ./...
.PHONY: test .PHONY: test
test: get_dep common-test test: deps common-test
.PHONY: test-short .PHONY: test-short
test-short: get_dep common-test-short test-short: deps common-test-short

View File

@ -116,6 +116,15 @@ common-check_license:
exit 1; \ exit 1; \
fi fi
.PHONY: common-deps
common-deps:
@echo ">> getting dependencies"
ifdef GO111MODULE
GO111MODULE=$(GO111MODULE) $(GO) mod download
else
$(GO) get $(GOOPTS) -t ./...
endif
.PHONY: common-test-short .PHONY: common-test-short
common-test-short: common-test-short:
@echo ">> running short tests" @echo ">> running short tests"
@ -221,7 +230,6 @@ precheck::
define PRECHECK_COMMAND_template = define PRECHECK_COMMAND_template =
precheck:: $(1)_precheck precheck:: $(1)_precheck
PRECHECK_COMMAND_$(1) ?= $(1) $$(strip $$(PRECHECK_OPTIONS_$(1))) PRECHECK_COMMAND_$(1) ?= $(1) $$(strip $$(PRECHECK_OPTIONS_$(1)))
.PHONY: $(1)_precheck .PHONY: $(1)_precheck
$(1)_precheck: $(1)_precheck: