Skip to content

Commit 8ea7583

Browse files
committed
Apidiff test runs only if there are changes in api/ or exp/api/
Signed-off-by: Meghana Jangi <[email protected]>
1 parent f68a146 commit 8ea7583

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,9 @@ APIDIFF_OLD_COMMIT ?= $(shell git rev-parse origin/main)
332332

333333
.PHONY: apidiff
334334
apidiff: $(GO_APIDIFF) ## Check for API differences
335-
$(GO_APIDIFF) $(APIDIFF_OLD_COMMIT) --print-compatible
335+
@if (git --no-pager diff --name-only FETCH_HEAD | grep "api/"); then \
336+
$(GO_APIDIFF) $(APIDIFF_OLD_COMMIT) --print-compatible; \
337+
fi
336338

337339
##@ build:
338340

0 commit comments

Comments
 (0)