Skip to content

Commit

Permalink
Improve 'Please run error'
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoShaka committed Nov 4, 2024
1 parent 15bc915 commit 60b00e4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
18 changes: 6 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1543,8 +1543,7 @@ derive:
.PHONY: derive-up-to-date
derive-up-to-date: must-start-clean/host derive
@if ! git diff --quiet; then \
echo 'Please run make derive.'; \
git diff; \
./build.assets/tooling/cmd/please-run.sh "derived functions" "make derive"; \
exit 1; \
fi

Expand Down Expand Up @@ -1579,16 +1578,14 @@ endif
.PHONY: protos-up-to-date/host
protos-up-to-date/host: must-start-clean/host grpc/host
@if ! git diff --quiet; then \
echo 'Please run make grpc.'; \
git diff; \
./build.assets/tooling/cmd/please-run.sh "protos gRPC" "make grpc"; \
exit 1; \
fi

.PHONY: must-start-clean/host
must-start-clean/host:
@if ! git diff --quiet; then \
echo 'This must be run from a repo with no unstaged commits.'; \
git diff; \
./build.assets/tooling/cmd/please-run.sh "protos gRPC" "make grpc"; \
exit 1; \
fi

Expand All @@ -1597,14 +1594,12 @@ must-start-clean/host:
crds-up-to-date: must-start-clean/host
$(MAKE) -C integrations/operator manifests
@if ! git diff --quiet; then \
echo 'Please run make -C integrations/operator manifests.'; \
git diff; \
./build.assets/tooling/cmd/please-run.sh "operator CRD manifests" "make -C integrations/operator crd"; \
exit 1; \
fi
$(MAKE) -C integrations/operator crd-docs
@if ! git diff --quiet; then \
echo 'Please run make -C integrations/operator crd-docs.'; \
git diff; \
./build.assets/tooling/cmd/please-run.sh "operator CRD docs" "make -C integrations/operator crd"; \
exit 1; \
fi

Expand All @@ -1613,8 +1608,7 @@ crds-up-to-date: must-start-clean/host
terraform-resources-up-to-date: must-start-clean/host
$(MAKE) -C integrations/terraform docs
@if ! git diff --quiet; then \
echo 'Please run make -C integrations/terraform docs.'; \
git diff; \
./build.assets/tooling/cmd/please-run.sh "TF provider docs" "make -C integrations/terraform docs"; \
exit 1; \
fi

Expand Down
3 changes: 3 additions & 0 deletions integrations/operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ help: ## Display this help.

##@ Development

.PHONY: crd ## Single command to generate anything CRD-related (manifests and docs)
crd: crdgen crd-docs

.PHONY: crdgen
crdgen: ## Generate CRDs
make -C crdgen
Expand Down

0 comments on commit 60b00e4

Please sign in to comment.