-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (46 loc) · 1.53 KB
/
Copy pathMakefile
File metadata and controls
57 lines (46 loc) · 1.53 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
SHELL := /bin/bash
.PHONY: precommit
precommit: check-links check-json check-index check-coverage check-acceptance bench-test
.PHONY: bench
bench:
@python3 bench/run.py $(BENCH_ARGS)
.PHONY: bench-test
bench-test:
@echo "bench-test: running bench unit tests..."
@python3 -m unittest discover -s bench -p 'test_*.py' 2>&1
.PHONY: check-acceptance
check-acceptance:
@bash scripts/acceptance.sh
.PHONY: release-check
release-check: precommit check-versions
@echo "ready to release"
.PHONY: check-links
check-links:
@bash scripts/check-links.sh
.PHONY: check-json
check-json:
@echo "Validating plugin JSON..."
@python3 -m json.tool .claude-plugin/plugin.json > /dev/null
@python3 -m json.tool .claude-plugin/marketplace.json > /dev/null
@echo "plugin.json + marketplace.json OK"
.PHONY: check-versions
check-versions:
@bash scripts/check-versions.sh
.PHONY: build-index
build-index:
@python3 scripts/build-index.py > rules/index.json
@echo "rules/index.json updated"
.PHONY: check-coverage
check-coverage:
@bash scripts/check-coverage.sh
.PHONY: check-index
check-index:
@python3 scripts/build-index.py > /tmp/coding-rules-index-check.json
@if ! diff -q rules/index.json /tmp/coding-rules-index-check.json > /dev/null 2>&1; then \
echo "ERROR: rules/index.json is stale. Run 'make build-index' and commit the result."; \
diff -u rules/index.json /tmp/coding-rules-index-check.json | head -40; \
rm -f /tmp/coding-rules-index-check.json; \
exit 1; \
fi
@rm -f /tmp/coding-rules-index-check.json
@echo "rules/index.json up-to-date"