mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-11 22:07:27 -08:00
Makefile.common: add deps target (#5339)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
parent
d6f0e14ac6
commit
b0be270958
|
@ -7,7 +7,12 @@ go:
|
||||||
|
|
||||||
go_import_path: github.com/prometheus/prometheus
|
go_import_path: github.com/prometheus/prometheus
|
||||||
|
|
||||||
|
# This ensures that the local cache is filled before running the CI.
|
||||||
|
# travis_retry retries the command 3 times if it fails as we've experienced
|
||||||
|
# random issues on Travis.
|
||||||
|
before_install:
|
||||||
|
- travis_retry make deps
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- GO111MODULE=on travis_retry go mod download
|
|
||||||
- make check_license style unused test staticcheck check_assets
|
- make check_license style unused test staticcheck check_assets
|
||||||
- git diff --exit-code
|
- git diff --exit-code
|
||||||
|
|
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue