diff --git a/Makefile b/Makefile index dec18746694..4ba2c69890f 100644 --- a/Makefile +++ b/Makefile @@ -88,13 +88,11 @@ golangci-lint: .PHONY: apidiff apidiff: go-apidiff ## Run the go-apidiff to verify any API differences compared with origin/master - $(GO_APIDIFF) master --compare-imports --print-compatible --repo-path=. + $(GOBIN)/go-apidiff master --compare-imports --print-compatible --repo-path=. -GO_APIDIFF = $(shell pwd)/bin/go-apidiff +.PHONY: go-apidiff go-apidiff: - @[ -f $(GO_APIDIFF) ] || { \ - cd tools && go build -tags=tools -o $(GO_APIDIFF) github.com/joelanford/go-apidiff ;\ - } + go install github.com/joelanford/go-apidiff@v0.4.0 ##@ Tests diff --git a/tools/tools.go b/tools/tools.go deleted file mode 100644 index 9e0f93339ae..00000000000 --- a/tools/tools.go +++ /dev/null @@ -1,22 +0,0 @@ -// +build tools - -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package tools -import ( - _ "github.com/joelanford/go-apidiff" -)