Skip to content

Commit

Permalink
Enforce dependency relationships during build
Browse files Browse the repository at this point in the history
Add dependency relationship enforcement to the checks stage of the
build process so that it runs as a part of CI.
  • Loading branch information
zjs committed Sep 22, 2018
1 parent c024d31 commit e182fb2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ GAS ?= $(GOPATH)/bin/gas$(BIN_ARCH)
MISSPELL ?= $(GOPATH)/bin/misspell$(BIN_ARCH)

.PHONY: all tools clean test check distro \
goversion goimports gopath govet gofmt misspell gas golint \
isos tethers apiservers copyright
goversion goimports gopath govet gofmt misspell gas golint copyright enforce-deps \
isos tethers apiservers

.DEFAULT_GOAL := all

Expand Down Expand Up @@ -154,7 +154,7 @@ misspell: $(MISSPELL)
# convenience targets
all: components tethers isos vic-machine imagec
tools: $(GOIMPORTS) $(GVT) $(GOLINT) $(SWAGGER) $(GAS) $(MISSPELL) goversion
check: goversion goimports gofmt misspell govet golint copyright whitespace gas
check: goversion goimports gofmt misspell govet golint copyright whitespace gas enforce-deps
apiservers: $(portlayerapi) $(docker-engine-api) $(serviceapi)
components: check apiservers $(vicadmin) $(rpctool)
isos: $(appliance) $(bootstrap)
Expand Down Expand Up @@ -240,6 +240,10 @@ govet:
gas: $(GAS)
@echo checking security problems

enforce-deps:
@echo checking dependencies...
@infra/scripts/go-deps-enforcement.sh

vendor: $(GVT)
@echo restoring vendor
$(GVT) restore
Expand Down

0 comments on commit e182fb2

Please sign in to comment.