File tree Expand file tree Collapse file tree 5 files changed +15
-4
lines changed Expand file tree Collapse file tree 5 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ KUBETEST_CONF_PATH ?= $(abspath $(E2E_DATA_DIR)/kubetest/conformance.yaml)
43
43
EXP_DIR := exp
44
44
45
45
# Binaries.
46
- GO_APIDIFF := $(TOOLS_BIN_DIR ) /go-apidiff
46
+ GO_APIDIFF_BIN := $(BIN_DIR ) /go-apidiff
47
+ GO_APIDIFF := $(TOOLS_DIR ) /$(GO_APIDIFF_BIN )
47
48
CLUSTERCTL := $(BIN_DIR ) /clusterctl
48
49
CONTROLLER_GEN := $(TOOLS_BIN_DIR ) /controller-gen
49
50
CONVERSION_GEN := $(TOOLS_BIN_DIR ) /conversion-gen
@@ -313,6 +314,10 @@ verify-gen: generate ## Verify generated files
313
314
echo " generated files are out of date, run make generate" ; exit 1; \
314
315
fi
315
316
317
+ .PHONY : apidiff
318
+ apidiff : $(GO_APIDIFF ) # # Check for API differences
319
+ $(GO_APIDIFF ) $(shell git rev-parse origin/main) --print-compatible
320
+
316
321
# #@ build:
317
322
318
323
.PHONY : binaries
@@ -629,3 +634,4 @@ clean-temporary: ## Remove all temporary files and folders
629
634
rm -rf test/e2e/capi-kubeadm-control-plane-controller-manager
630
635
rm -rf test/e2e/logs
631
636
rm -rf test/e2e/resources
637
+
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ require (
8
8
github.com/golang/mock v1.6.0
9
9
github.com/golangci/golangci-lint v1.44.2
10
10
github.com/itchyny/gojq v0.12.6
11
+ github.com/joelanford/go-apidiff v0.2.0
11
12
github.com/onsi/ginkgo v1.16.5
12
13
github.com/spf13/pflag v1.0.5
13
14
k8s.io/apimachinery v0.23.0-alpha.4
@@ -238,6 +239,7 @@ require (
238
239
go.opencensus.io v0.23.0 // indirect
239
240
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
240
241
golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce // indirect
242
+ golang.org/x/exp v0.0.0-20211029160041-3396431c207b // indirect
241
243
golang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57 // indirect
242
244
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
243
245
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
Original file line number Diff line number Diff line change @@ -905,6 +905,8 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfC
905
905
github.com/jmoiron/sqlx v1.2.0 /go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks =
906
906
github.com/jmoiron/sqlx v1.2.1-0.20190826204134-d7d95172beb5 /go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks =
907
907
github.com/joelanford/go-apidiff v0.1.0 /go.mod h1:wgVWgVCwYYkjcYpJtBnWYkyUYZfVovO3Y5pX49mJsqs =
908
+ github.com/joelanford/go-apidiff v0.2.0 h1:qChl0utb9SUk8K1XYjxd0uamfSPELIgleS0Ve5RggKs =
909
+ github.com/joelanford/go-apidiff v0.2.0 /go.mod h1:46ufX9MyC2TmG+kCfwCB+Yxu19l7WN+4CN/flWAJ2v8 =
908
910
github.com/jonboulle/clockwork v0.1.0 /go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo =
909
911
github.com/jonboulle/clockwork v0.2.0 /go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8 =
910
912
github.com/jonboulle/clockwork v0.2.2 /go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8 =
@@ -1676,6 +1678,7 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0
1676
1678
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd /go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM =
1677
1679
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6 /go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU =
1678
1680
golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5 /go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw =
1681
+ golang.org/x/exp v0.0.0-20211029160041-3396431c207b h1:58UzImHd/vC6WxTQm75bwlBAOU/jDjzIMHUGO8O65UM =
1679
1682
golang.org/x/exp v0.0.0-20211029160041-3396431c207b /go.mod h1:OyI624f2tQ/aU3IMa7GB16Hk54CHURAfHfj6tMqtyhA =
1680
1683
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067 /go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js =
1681
1684
golang.org/x/image v0.0.0-20190802002840-cff245a6509b /go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0 =
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import (
28
28
_ "github.com/golang/mock/mockgen"
29
29
_ "github.com/golangci/golangci-lint/cmd/golangci-lint"
30
30
_ "github.com/itchyny/gojq/cmd/gojq"
31
+ _ "github.com/joelanford/go-apidiff"
31
32
_ "github.com/onsi/ginkgo/ginkgo"
32
33
_ "k8s.io/apimachinery/pkg/util/intstr"
33
34
_ "k8s.io/code-generator"
Original file line number Diff line number Diff line change @@ -19,10 +19,9 @@ set -o nounset
19
19
set -o pipefail
20
20
21
21
REPO_ROOT=$( dirname " ${BASH_SOURCE[0]} " ) /..
22
+ APIDIFF=" ${REPO_ROOT} /hack/tools/bin/go-apidiff"
22
23
23
- APIDIFF=" hack/tools/bin/go-apidiff"
24
-
25
- cd " ${REPO_ROOT} " && make ${APIDIFF}
24
+ cd " ${REPO_ROOT} " && make apidiff
26
25
echo " *** Running go-apidiff ***"
27
26
28
27
${APIDIFF} " ${PULL_BASE_SHA} " --print-compatible
You can’t perform that action at this time.
0 commit comments