Skip to content

🌱 apidiff: deduplicate apidiff logic #6180

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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