mirror of
https://github.com/prometheus/prometheus
synced 2024-12-23 15:04:13 +00: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
|
||||
|
||||
# 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:
|
||||
- GO111MODULE=on travis_retry go mod download
|
||||
- make check_license style unused test staticcheck check_assets
|
||||
- git diff --exit-code
|
||||
|
@ -116,6 +116,15 @@ common-check_license:
|
||||
exit 1; \
|
||||
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
|
||||
common-test-short:
|
||||
@echo ">> running short tests"
|
||||
@ -221,7 +230,6 @@ precheck::
|
||||
define PRECHECK_COMMAND_template =
|
||||
precheck:: $(1)_precheck
|
||||
|
||||
|
||||
PRECHECK_COMMAND_$(1) ?= $(1) $$(strip $$(PRECHECK_OPTIONS_$(1)))
|
||||
.PHONY: $(1)_precheck
|
||||
$(1)_precheck:
|
||||
|
Loading…
Reference in New Issue
Block a user