Skip to content

Commit

Permalink
Merge pull request #3278 from meghanajangi/apidiff-fix
Browse files Browse the repository at this point in the history
fix: Apidiff prow job is failing
  • Loading branch information
k8s-ci-robot authored Mar 7, 2022
2 parents 7ce1753 + be85bb3 commit be5f626
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,11 @@ verify-gen: generate ## Verify generated files
echo "generated files are out of date, run make generate"; exit 1; \
fi

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

##@ build:

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

REPO_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
APIDIFF="${REPO_ROOT}/hack/tools/bin/go-apidiff"

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

${APIDIFF} "${PULL_BASE_SHA}" --print-compatible
echo "*** Running go-apidiff ***"
APIDIFF_OLD_COMMIT="${PULL_BASE_SHA}" make apidiff

0 comments on commit be5f626

Please sign in to comment.