Skip to content

Commit

Permalink
apidiff: deduplicate apidiff logic
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Büringer [email protected]
  • Loading branch information
sbueringer committed Feb 21, 2022
1 parent d13b5eb commit 3c01f4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,11 @@ lint-fix: $(GOLANGCI_LINT) ## Lint the codebase and run auto-fixers if supported
tiltfile-fix: ## Format the Tiltfile
./hack/verify-starlark.sh fix

APIDIFF_OLD_COMMIT ?= $(shell git rev-parse origin/main)

.PHONY: apidiff
apidiff: $(GO_APIDIFF) ## Check for API differences
$(GO_APIDIFF) $(shell git rev-parse origin/main) --print-compatible
$(GO_APIDIFF) $(APIDIFF_OLD_COMMIT) --print-compatible

ALL_VERIFY_CHECKS = doctoc boilerplate shellcheck tiltfile modules gen conversions docker-provider book-links

Expand Down
6 changes: 2 additions & 4 deletions scripts/ci-apidiff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ set -o pipefail

REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/..

APIDIFF="hack/tools/bin/go-apidiff"
cd "${REPO_ROOT}"

cd "${REPO_ROOT}" && make ${APIDIFF}
echo "*** Running go-apidiff ***"

${APIDIFF} "${PULL_BASE_SHA}" --print-compatible
APIDIFF_OLD_COMMIT="${PULL_BASE_SHA}" make apidiff

0 comments on commit 3c01f4f

Please sign in to comment.