Skip to content

Commit

Permalink
Update Makefile.common
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Pasquier <[email protected]>
  • Loading branch information
simonpasquier committed Mar 13, 2019
1 parent c5e1469 commit a2c4da0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
9 changes: 2 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,8 @@ STATICCHECK_IGNORE = \
github.com/prometheus/client_golang/prometheus/promhttp/instrument_server_test.go:SA1019 \
github.com/prometheus/client_golang/prometheus/http.go:SA1019

.PHONY: get_dep
get_dep:
@echo ">> getting dependencies"
$(GO) get -t ./...

.PHONY: test
test: get_dep common-test
test: deps common-test

.PHONY: test-short
test-short: get_dep common-test-short
test-short: deps common-test-short
10 changes: 9 additions & 1 deletion Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit a2c4da0

Please sign in to comment.