File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,20 @@ ifndef PROVIDER_VERSION
1212 $(error PROVIDER_VERSION is undefined)
1313endif
1414
15+ .PHONY : verify
16+ verify : verify-ocp-manifests
17+
18+ # NOTE: This target extracts the provider version from the existing generated manifest
19+ # and uses it for regeneration. This means the version label itself is NOT verified,
20+ # only that the rest of the manifest structure is correct.
21+ .PHONY : verify-ocp-manifests
22+ verify-ocp-manifests :
23+ @echo " Extracting provider version from existing manifest..."
24+ $(eval PROVIDER_VERSION := $(shell yq eval '.metadata.labels."provider.cluster.x-k8s.io/version"' manifests/0000_30_cluster-api_04_cm.infrastructure-aws.yaml) )
25+ @echo " Using PROVIDER_VERSION=$( PROVIDER_VERSION) for verification"
26+ @$(MAKE ) ocp-manifests PROVIDER_VERSION=$(PROVIDER_VERSION )
27+ ./verify-diff.sh
28+
1529.PHONY : update-manifests-gen
1630update-manifests-gen :
1731 cd tools && go get github.com/openshift/cluster-capi-operator/manifests-gen && go mod tidy && go mod vendor
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ FILE_DIFF=$( git ls-files -o --exclude-standard)
4+
5+ if [ " $FILE_DIFF " != " " ]; then
6+ echo " Found untracked files:"
7+ echo " $FILE_DIFF "
8+ exit 1
9+ fi
10+
11+ git diff --exit-code
You can’t perform that action at this time.
0 commit comments