forked from NeoLabHQ/context-engineering-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
91 lines (83 loc) · 3.72 KB
/
Makefile
File metadata and controls
91 lines (83 loc) · 3.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Makefile for Context Engineering Kit
# Plugin management commands
PLUGINS := code-review customaize-agent ddd docs git kaizen mcp reflexion sadd sdd tdd tech-stack fpf
MARKETPLACE := .claude-plugin/marketplace.json
.PHONY: help sync-docs-to-plugins sync-plugins-to-docs set-version set-marketplace-version list-plugins
help:
@echo "Available commands:"
@echo " make sync-docs-to-plugins - Copy README.md from docs/plugins/* to plugins/*"
@echo " make sync-plugins-to-docs - Copy README.md from plugins/* to docs/plugins/*"
@echo " make set-version PLUGIN=name VERSION=x.y.z - Set version for a plugin"
@echo " make set-marketplace-version VERSION=x.y.z - Set version for marketplace"
@echo " make list-plugins - List all available plugins"
# Copy README.md files from docs/plugins/ to respective plugins/ folders
sync-docs-to-plugins:
@echo "Syncing README.md files from docs/plugins/ to plugins/..."
@for plugin in $(PLUGINS); do \
if [ -f "docs/plugins/$$plugin/README.md" ]; then \
cp "docs/plugins/$$plugin/README.md" "plugins/$$plugin/README.md"; \
echo " Copied: docs/plugins/$$plugin/README.md -> plugins/$$plugin/README.md"; \
else \
echo " Skipped: docs/plugins/$$plugin/README.md (not found)"; \
fi; \
done
@echo "Done."
# Copy README.md files from plugins/ to docs/plugins/ folders
sync-plugins-to-docs:
@echo "Syncing README.md files from plugins/ to docs/plugins/..."
@for plugin in $(PLUGINS); do \
if [ -f "plugins/$$plugin/README.md" ]; then \
mkdir -p "docs/plugins/$$plugin"; \
cp "plugins/$$plugin/README.md" "docs/plugins/$$plugin/README.md"; \
echo " Copied: plugins/$$plugin/README.md -> docs/plugins/$$plugin/README.md"; \
else \
echo " Skipped: plugins/$$plugin/README.md (not found)"; \
fi; \
done
@echo "Done."
# Set version for a specific plugin
# Usage: make set-version PLUGIN=tdd VERSION=1.2.0
set-version:
ifndef PLUGIN
$(error PLUGIN is required. Usage: make set-version PLUGIN=name VERSION=x.y.z)
endif
ifndef VERSION
$(error VERSION is required. Usage: make set-version PLUGIN=name VERSION=x.y.z)
endif
@if [ ! -f "plugins/$(PLUGIN)/.claude-plugin/plugin.json" ]; then \
echo "Error: Plugin '$(PLUGIN)' not found"; \
exit 1; \
fi
@echo "Updating version for plugin '$(PLUGIN)' to $(VERSION)..."
@# Update plugin.json
@jq '.version = "$(VERSION)"' "plugins/$(PLUGIN)/.claude-plugin/plugin.json" > "plugins/$(PLUGIN)/.claude-plugin/plugin.json.tmp" && \
mv "plugins/$(PLUGIN)/.claude-plugin/plugin.json.tmp" "plugins/$(PLUGIN)/.claude-plugin/plugin.json"
@echo " Updated: plugins/$(PLUGIN)/.claude-plugin/plugin.json"
@# Update marketplace.json
@jq '(.plugins[] | select(.name == "$(PLUGIN)")).version = "$(VERSION)"' "$(MARKETPLACE)" > "$(MARKETPLACE).tmp" && \
mv "$(MARKETPLACE).tmp" "$(MARKETPLACE)"
@echo " Updated: $(MARKETPLACE)"
@echo "Done. Version set to $(VERSION) for plugin '$(PLUGIN)'"
# Set version for the marketplace
set-marketplace-version:
ifndef VERSION
$(error VERSION is required. Usage: make set-marketplace-version VERSION=x.y.z)
endif
@if [ ! -f "$(MARKETPLACE)" ]; then \
echo "Error: Marketplace file '$(MARKETPLACE)' not found"; \
exit 1; \
fi
@echo "Updating marketplace version to $(VERSION)..."
@jq '.version = "$(VERSION)"' "$(MARKETPLACE)" > "$(MARKETPLACE).tmp" && \
mv "$(MARKETPLACE).tmp" "$(MARKETPLACE)"
@echo " Updated: $(MARKETPLACE)"
@echo "Done. Marketplace version set to $(VERSION)"
# List all available plugins
list-plugins:
@echo "Available plugins:"
@for plugin in $(PLUGINS); do \
if [ -f "plugins/$$plugin/.claude-plugin/plugin.json" ]; then \
version=$$(jq -r '.version' "plugins/$$plugin/.claude-plugin/plugin.json"); \
echo " $$plugin (v$$version)"; \
fi; \
done