@@ -6,8 +6,9 @@ CONSENT_UPSTREAM_BRANCH ?= main
66CONSENT_SUBTREE_PREFIX ?= consent-protocol
77CONSENT_SYNC_REF ?= refs/subtree-sync/consent-protocol
88CONSENT_MONOREPO_OPS ?= consent-protocol/ops/monorepo
9+ CONSENT_UPSTREAM_VERIFY_CI ?= 1
910
10- .PHONY : sync-protocol check-protocol-sync push-protocol push-protocol-force setup verify-setup
11+ .PHONY : sync-protocol check-protocol-sync push-protocol push-protocol-force verify-protocol-upstream-ci setup verify-setup
1112
1213sync-protocol : # # Pull latest consent-protocol from upstream
1314 @echo " Pulling $( CONSENT_SUBTREE_PREFIX) from upstream..."
@@ -28,14 +29,29 @@ check-protocol-sync: ## Check if consent-protocol is in sync with upstream
2829push-protocol : check-protocol-sync # # Push consent-protocol changes to upstream (sync check first)
2930 @echo " Pushing $( CONSENT_SUBTREE_PREFIX) / to upstream..."
3031 git subtree push --prefix=$(CONSENT_SUBTREE_PREFIX ) $(CONSENT_UPSTREAM_REMOTE ) $(CONSENT_UPSTREAM_BRANCH )
32+ @if [ " $( CONSENT_UPSTREAM_VERIFY_CI) " = " 1" ]; then \
33+ $(MAKE ) --no-print-directory verify-protocol-upstream-ci; \
34+ else \
35+ echo " Skipping upstream CI verification (CONSENT_UPSTREAM_VERIFY_CI=$( CONSENT_UPSTREAM_VERIFY_CI) )." ; \
36+ fi
3137 @echo " Done. Upstream consent-protocol repo is now updated."
3238
3339push-protocol-force : # # Push consent-protocol to upstream (skip sync check)
3440 @echo " ⚠ Skipping upstream sync check (force mode)..."
3541 @echo " Pushing $( CONSENT_SUBTREE_PREFIX) / to upstream..."
3642 git subtree push --prefix=$(CONSENT_SUBTREE_PREFIX ) $(CONSENT_UPSTREAM_REMOTE ) $(CONSENT_UPSTREAM_BRANCH )
43+ @if [ " $( CONSENT_UPSTREAM_VERIFY_CI) " = " 1" ]; then \
44+ $(MAKE ) --no-print-directory verify-protocol-upstream-ci; \
45+ else \
46+ echo " Skipping upstream CI verification (CONSENT_UPSTREAM_VERIFY_CI=$( CONSENT_UPSTREAM_VERIFY_CI) )." ; \
47+ fi
3748 @echo " Done. Upstream consent-protocol repo is now updated."
3849
50+ verify-protocol-upstream-ci : # # Verify upstream consent-protocol CI run for current upstream HEAD
51+ @CONSENT_UPSTREAM_REPO=hushh-labs/consent-protocol \
52+ CONSENT_UPSTREAM_BRANCH=$(CONSENT_UPSTREAM_BRANCH ) \
53+ bash scripts/ci/verify-protocol-upstream-ci.sh
54+
3955setup : # # First-time setup (hooks + remote + verification)
4056 @CONSENT_UPSTREAM_REMOTE=$(CONSENT_UPSTREAM_REMOTE ) \
4157 CONSENT_UPSTREAM_BRANCH=$(CONSENT_UPSTREAM_BRANCH ) \
0 commit comments