Skip to content

Commit ba6295e

Browse files
Merge pull request #585 from rhmdnd/add-verify-bundle-target
Add a Makefile target to verify bundles
2 parents 3deb98d + 1ad89ab commit ba6295e

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,10 @@ bundle: check-operator-version operator-sdk manifests update-skip-range kustomiz
327327
git restore config/manifests/kustomization.yaml
328328
$(SDK_BIN) bundle validate ./bundle
329329

330+
.PHONY: verify-bundle
331+
verify-bundle: bundle ## Verify the bundle doesn't alter the state of the tree
332+
hack/tree-status
333+
330334
.PHONY: bundle-image
331335
bundle-image: bundle ## Build the bundle image.
332336
$(RUNTIME) $(RUNTIME_BUILD_CMD) -f bundle.Dockerfile -t $(BUNDLE_IMG) .

hack/tree-status

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
STATUS=$(git status --porcelain)
5+
if [[ -z $STATUS ]]; then
6+
echo tree is clean
7+
else
8+
echo tree is dirty, please commit all changes
9+
echo "$STATUS"
10+
git diff
11+
exit 1
12+
fi

0 commit comments

Comments
 (0)