Skip to content

Commit

Permalink
add check modules to check outdated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
cpanato committed Jul 21, 2020
1 parent 605f6fd commit 5e28150
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
18 changes: 18 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ jobs:
- checkout
- run: make check-style

check-modules:
executor:
name: default
steps:
- checkout
- run: make check-modules

generate:
executor:
name: default
Expand Down Expand Up @@ -101,6 +108,12 @@ workflows:
version: 2
untagged-build:
jobs:
- check-modules:
filters:
branches:
ignore:
- master
- /^v.*/
- shellcheck/check:
exclude: ./vendor/*
filters:
Expand Down Expand Up @@ -151,6 +164,11 @@ workflows:

master-build:
jobs:
- check-modules:
filters:
branches:
only:
- master
- lint:
filters:
branches:
Expand Down
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,4 @@ tags
.vscode/*
.history
# End of https://www.gitignore.io/api/go,vim,emacs,visualstudiocode
/bin/openapi-gen
/bin/openapi-gen-master
/bin/shadow
/bin/shadow-master
/bin/*
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ GOVERALLS_VER := master
GOVERALLS_BIN := goveralls
GOVERALLS_GEN := $(TOOLS_BIN_DIR)/$(GOVERALLS_BIN)

OUTDATED_VER := master
OUTDATED_BIN := go-mod-outdated
OUTDATED_GEN := $(TOOLS_BIN_DIR)/$(OUTDATED_BIN)

all: check-style unittest build ## Run all the things

unittest: ## Runs unit tests
Expand Down Expand Up @@ -124,14 +128,19 @@ clean: ## Clean up everything
$(SHADOW_GEN): ## Build shadow
GOBIN=$(TOOLS_BIN_DIR) $(GO_INSTALL) golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow $(SHADOW_BIN) $(SHADOW_VER)


$(OPENAPI_GEN): ## Build open-api
GOBIN=$(TOOLS_BIN_DIR) $(GO_INSTALL) k8s.io/kube-openapi/cmd/openapi-gen $(OPENAPI_BIN) $(OPENAPI_VER)


$(GOVERALLS_GEN): ## Build open-api
GOBIN=$(TOOLS_BIN_DIR) $(GO_INSTALL) github.com/mattn/goveralls $(GOVERALLS_BIN) $(GOVERALLS_VER)

$(OUTDATED_GEN): ## Build open-api
GOBIN=$(TOOLS_BIN_DIR) $(GO_INSTALL) github.com/psampaz/go-mod-outdated $(OUTDATED_BIN) $(OUTDATED_VER)

.PHONY: check-modules
check-modules: $(OUTDATED_GEN) ## Check outdated modules
@echo Checking outdated modules
$(GO) list -mod=mod -u -m -json all | $(OUTDATED_GEN) -update -direct

## Help documentatin à la https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
help:
Expand Down

0 comments on commit 5e28150

Please sign in to comment.