mirror of
https://github.com/cozystack/cozystack.git
synced 2026-10-24 20:16:50 +09:00
package.mk set .PHONY with `=` rather than `:`, which assigns a variable named .PHONY instead of declaring anything phony, so none of the targets package.mk defines was phony in any package that includes it. Declare exactly the concrete targets package.mk defines: help, show, diff, apply, delete, suspend, resume, check and clean. The earlier list named update and image, which package.mk does not define — naming an undefined target in .PHONY creates it as an empty target, so `make image` and `make update` would report success without running anything in the many packages that lack those recipes. It also omitted check and clean, the targets a same-named file or directory could actually shadow. The neighbouring .DEFAULT_GOAL is a variable and correctly keeps its equals sign. A comment now records which of the two adjacent lines is which, so the corrected one does not pull the other into its shape by analogy. The trigger map in docs/agents/contributing.md called the two files a byte-for-byte copy, which was exact rather than loose: they were the same object. They stop being one here, so the entry now records that they were identical and no longer are, and asks for a diff-and-port, the wording the map already uses for the other copy that has diverged. It deliberately does not enumerate which lines differ: that set moves as the copy catches up, and an entry that names it would be wrong again by the next port. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
38 lines
1.4 KiB
Makefile
38 lines
1.4 KiB
Makefile
# .DEFAULT_GOAL is a variable, so `=` is correct here. .PHONY is a target and
|
|
# takes a colon; written as an assignment it declares nothing and make is silent.
|
|
.DEFAULT_GOAL=help
|
|
.PHONY: help show diff apply delete suspend resume check clean
|
|
|
|
help: ## Show this help.
|
|
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
|
|
|
|
show: check ## Show output of rendered templates
|
|
cozyhr show -n $(NAMESPACE) $(NAME)
|
|
|
|
apply: check suspend ## Apply Helm release to a Kubernetes cluster
|
|
cozyhr apply -n $(NAMESPACE) $(NAME)
|
|
|
|
diff: check ## Diff Helm release against objects in a Kubernetes cluster
|
|
cozyhr diff -n $(NAMESPACE) $(NAME)
|
|
|
|
suspend: check ## Suspend reconciliation for an existing Helm release
|
|
cozyhr suspend -n $(NAMESPACE) $(NAME)
|
|
|
|
resume: check ## Resume reconciliation for an existing Helm release
|
|
cozyhr resume -n $(NAMESPACE) $(NAME)
|
|
|
|
delete: check suspend ## Delete Helm release from a Kubernetes cluster
|
|
cozyhr delete -n $(NAMESPACE) $(NAME)
|
|
|
|
check:
|
|
@if [ -z "$(NAME)" ]; then echo "env NAME is not set!" >&2; exit 1; fi
|
|
@if [ -z "$(NAMESPACE)" ]; then echo "env NAMESPACE is not set!" >&2; exit 1; fi
|
|
|
|
clean:
|
|
rm -rf charts/
|
|
|
|
%-update:
|
|
helm repo add $(REPO_NAME) $(REPO_URL)
|
|
helm repo update $(REPO_NAME)
|
|
helm pull $(REPO_NAME)/$(CHART_NAME) --untar --untardir charts --version "$(CHART_VERSION)"
|