Skip to content

Commit be5f626

Browse files
authored
Merge pull request #3278 from meghanajangi/apidiff-fix
fix: Apidiff prow job is failing
2 parents 7ce1753 + be85bb3 commit be5f626

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,11 @@ verify-gen: generate ## Verify generated files
314314
echo "generated files are out of date, run make generate"; exit 1; \
315315
fi
316316

317+
APIDIFF_OLD_COMMIT ?= $(shell git rev-parse origin/main)
318+
317319
.PHONY: apidiff
318320
apidiff: $(GO_APIDIFF) ## Check for API differences
319-
$(GO_APIDIFF) $(shell git rev-parse origin/main) --print-compatible
321+
$(GO_APIDIFF) $(APIDIFF_OLD_COMMIT) --print-compatible
320322

321323
##@ build:
322324

scripts/ci-apidiff.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ set -o nounset
1919
set -o pipefail
2020

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

24-
cd "${REPO_ROOT}" && make apidiff
25-
echo "*** Running go-apidiff ***"
23+
cd "${REPO_ROOT}"
2624

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

0 commit comments

Comments
 (0)