Skip to content

Commit

Permalink
🏃 add apidiff to verify.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeldeib committed Apr 16, 2020
1 parent bac7e8a commit 1de3ab3
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export GO111MODULE=on
TOOLS_DIR := hack/tools
TOOLS_BIN_DIR := $(TOOLS_DIR)/bin
GOLANGCI_LINT := $(abspath $(TOOLS_BIN_DIR)/golangci-lint)
GO_APIDIFF := $(abspath $(TOOLS_BIN_DIR)/go-apidiff)

# The help will print out all targets with their descriptions organized bellow their categories. The categories are represented by `##@` and the target descriptions by `##`.
# The awk commands is responsible to read the entire set of makefiles included in this invocation, looking for lines of the file as xyz: ## something, and then pretty-format the target and help. Then, if there's a line with ##@ something, that gets pretty-printed as a category.
Expand All @@ -60,7 +61,10 @@ test: ## Run the script check-everything.sh which will check all.
## --------------------------------------

$(GOLANGCI_LINT): $(TOOLS_DIR)/go.mod # Build golangci-lint from tools folder.
cd $(TOOLS_DIR); go build -tags=tools -o bin/golangci-lint github.com/golangci/golangci-lint/cmd/golangci-lint
cd $(TOOLS_DIR) && go build -tags=tools -o bin/golangci-lint github.com/golangci/golangci-lint/cmd/golangci-lint

$(GO_APIDIFF): $(TOOLS_DIR)/go.mod # Build go-apidiff from tools folder.
cd $(TOOLS_DIR) && go build -tags=tools -o bin/go-apidiff github.com/joelanford/go-apidiff

## --------------------------------------
## Linting
Expand Down
5 changes: 4 additions & 1 deletion hack/tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ module sigs.k8s.io/controller-runtime/hack/tools

go 1.13

require github.com/golangci/golangci-lint v1.23.6
require (
github.com/golangci/golangci-lint v1.23.6
github.com/joelanford/go-apidiff v0.0.0-20191206194835-106bcff5f060
)
Loading

0 comments on commit 1de3ab3

Please sign in to comment.