-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
108 lines (98 loc) · 5.56 KB
/
Copy pathMakefile
File metadata and controls
108 lines (98 loc) · 5.56 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# Scribe plugin maintenance targets.
# Run `make help` to see what's available.
.PHONY: help validate publish icons clean release-notes orient check-upstream
# Override on the command line, e.g. make publish VERSION=0.2.1
VERSION ?=
help: ## Show available targets and what they do
@grep -E '^[a-zA-Z_-]+:.*?## ' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-18s\033[0m %s\n", $$1, $$2}'
validate: ## Validate manifests parse and skill structure is intact
@python3 -m json.tool .claude-plugin/plugin.json > /dev/null && echo " plugin.json - valid JSON"
@python3 -m json.tool .claude-plugin/marketplace.json > /dev/null && echo " marketplace.json - valid JSON"
@for skill in workspace auth-init auth-add auth-status push client-resolve start \
gmail calendar sheets slides docs drive contacts tasks forms chat \
daily-briefing inbox-triage support-scan meeting-prep thread-to-doc \
client-digest weekly-wrap follow-up-tracker contact-onboard doc-chase \
attach-vault event-recap smart-reply educator-setup; do \
test -f skills/$$skill/SKILL.md && echo " skills/$$skill/SKILL.md - present" || (echo " MISSING - skills/$$skill/SKILL.md"; exit 1); \
done
@grep -q "name" .claude-plugin/plugin.json && echo " plugin name field - present"
@grep -q "mcpServers" .claude-plugin/plugin.json && echo " mcpServers - declared"
check-upstream: ## Compare pinned workspace-mcp version against latest PyPI release
@current=$$(jq -r '.mcpServers.scribe.args[0]' .claude-plugin/plugin.json | sed 's/workspace-mcp@//'); \
latest=$$(curl -s https://pypi.org/pypi/workspace-mcp/json | jq -r '.info.version'); \
if [ "$$current" = "$$latest" ]; then \
echo "PASS - current pin $$current matches latest PyPI release"; \
else \
echo "OUTDATED - current pin $$current, latest is $$latest"; \
echo "Review changelog at https://github.com/taylorwilsdon/google_workspace_mcp/releases"; \
fi
publish: ## Bump version, commit, tag, push, cut GH release. Usage - make publish VERSION=0.2.1
@if [ -z "$(VERSION)" ]; then \
echo "ERROR - set VERSION, e.g. make publish VERSION=0.2.1"; \
exit 1; \
fi
@if ! command -v jq >/dev/null; then echo "ERROR - jq required"; exit 1; fi
@if ! command -v gh >/dev/null; then echo "ERROR - gh CLI required"; exit 1; fi
@if [ -n "$$(git status --porcelain)" ]; then \
echo "ERROR - working tree dirty. Commit or stash first."; \
git status --short; \
exit 1; \
fi
@echo "Bumping version to $(VERSION) in plugin.json and marketplace.json..."
@jq --arg v "$(VERSION)" '.version = $$v' .claude-plugin/plugin.json > .claude-plugin/plugin.json.tmp && \
mv .claude-plugin/plugin.json.tmp .claude-plugin/plugin.json
@jq --arg v "$(VERSION)" '.plugins[0].version = $$v' .claude-plugin/marketplace.json > .claude-plugin/marketplace.json.tmp && \
mv .claude-plugin/marketplace.json.tmp .claude-plugin/marketplace.json
@$(MAKE) --no-print-directory validate
@echo ""
@echo "Committing..."
@git add .claude-plugin/plugin.json .claude-plugin/marketplace.json
@git commit -m "Release v$(VERSION)"
@echo "Tagging v$(VERSION)..."
@git tag -a v$(VERSION) -m "Scribe v$(VERSION)"
@echo "Pushing main and tag..."
@git push origin main v$(VERSION)
@echo ""
@echo "Creating GitHub release with auto-generated notes..."
@gh release create v$(VERSION) --title "Scribe v$(VERSION)" --generate-notes
@echo ""
@echo "DONE - https://github.com/juliandickie/scribe-plugin/releases/tag/v$(VERSION)"
icons: ## Regenerate icon variants (512/256/128/64/32) from docs/images/icon-1024.png
@if ! command -v magick >/dev/null; then echo "ERROR - ImageMagick required"; exit 1; fi
@if [ ! -f docs/images/icon-1024.png ]; then \
echo "ERROR - docs/images/icon-1024.png not found. Generate the master icon first."; \
exit 1; \
fi
@for size in 512 256 128 64 32; do \
echo " Generating icon-$$size.png..."; \
magick docs/images/icon-1024.png -resize $${size}x$${size} -strip docs/images/icon-$${size}.png; \
done
@cp docs/images/icon-256.png docs/images/icon.png
@echo " Default icon.png set to 256 variant"
@echo "DONE - regenerated 6 icon files"
release-notes: ## Print recent commits since the last tag (helps draft notes)
@LAST_TAG=$$(git describe --tags --abbrev=0 2>/dev/null) && \
echo "Commits since $$LAST_TAG -" && \
git log $$LAST_TAG..HEAD --oneline
orient: ## One-shot snapshot for new sessions - state, recent work, releases, version match, open issues
@echo "=== Validation ==="
@$(MAKE) --no-print-directory validate
@echo ""
@echo "=== Recent local commits ==="
@git log --oneline -10
@echo ""
@echo "=== Published GitHub releases (latest 5) ==="
@gh release list --repo juliandickie/scribe-plugin --limit 5 2>/dev/null || echo " (gh CLI unavailable or not authenticated)"
@echo ""
@echo "=== Local manifest versions vs latest tag ==="
@echo " plugin.json: $$(jq -r .version .claude-plugin/plugin.json 2>/dev/null || echo '?')"
@echo " marketplace.json: $$(jq -r '.plugins[0].version' .claude-plugin/marketplace.json 2>/dev/null || echo '?')"
@echo " latest git tag: $$(git describe --tags --abbrev=0 2>/dev/null || echo 'no tags')"
@echo ""
@echo "=== Open issues on this repo ==="
@gh issue list --repo juliandickie/scribe-plugin 2>/dev/null || echo " (gh CLI unavailable)"
@echo ""
@echo "=== Open upstream design discussion (#771) ==="
@gh issue view 771 --repo taylorwilsdon/google_workspace_mcp --json title,state --jq '" " + .state + " - " + .title' 2>/dev/null || echo " (unable to fetch upstream issue 771)"
clean: ## Remove generated artifacts (no-op for now)
@echo "Nothing to clean"