-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
120 lines (102 loc) · 4.08 KB
/
Makefile
File metadata and controls
120 lines (102 loc) · 4.08 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
109
110
111
112
113
114
115
116
117
118
119
120
.PHONY: help run dev build preview aggregate aggregate-repo test-aggregate-local clean clean-projects clean-aggregated-git test test-unit test-integration check spelling linkcheck woke
help:
@echo "Garden Linux Documentation Hub - Available targets:"
@echo ""
@echo " Development:"
@echo " run - Run docs development server"
@echo " build - Build documentation for production"
@echo " preview - Preview production build locally"
@echo ""
@echo " Testing:"
@echo " test - Run full test suite (38 tests: unit + integration)"
@echo " test-unit - Run unit tests only (35 tests)"
@echo " test-integration - Run integration tests only (3 tests)"
@echo ""
@echo " Quality Checks:"
@echo " check - Run all quality checks (spelling, links, inclusive language)"
@echo " spelling - Check spelling with codespell"
@echo " linkcheck - Check links with lychee"
@echo " woke - Check inclusive language with woke"
@echo ""
@echo " Documentation Aggregation:"
@echo " aggregate-local - Aggregate from local repos (file:// URLs in repos-config.local.json)"
@echo " aggregate - Aggregate from locked commits (repos-config.json)"
@echo " aggregate-update - Fetch latest from remotes and update commit locks"
@echo " aggregate-repo - Aggregate single repo (usage: make aggregate-repo REPO=gardenlinux)"
@echo " aggregate-update-repo - Update single repo to latest (usage: make aggregate-update-repo REPO=gardenlinux)"
@echo ""
@echo " Utilities:"
@echo " clean - Clean aggregated docs and build artifacts"
@echo ""
install:
@echo "Installing dependencies..."
pnpm install
pip install git+https://github.com/gardenlinux/glrd.git@v4.1.0
pip install git+https://github.com/gardenlinux/python-gardenlinux-lib.git@0.10.20
pip install -r requirements.txt
dev:
pnpm run docs:dev
build: install clean aggregate
pnpm run docs:build
preview:
pnpm run docs:preview
# Testing
test: test-unit test-integration
@echo "All tests passed!"
test-unit:
@echo "Running unit tests..."
python3 -m pytest tests/unit/ -v
test-integration:
@echo "Running integration tests..."
python3 -m pytest tests/integration/ -v
# Quality Checks
check: spelling linkcheck woke
@echo "All quality checks passed!"
spelling:
@echo "Running spelling checks..."
@pnpm run docs:spelling
linkcheck:
@echo "Running link checks..."
@pnpm run docs:linkcheck
woke:
@echo "Running inclusive language checks..."
@pnpm run docs:woke
# Documentation Aggregation
aggregate-local:
@echo "Aggregating from local repositories (relative paths)..."
python3 src/aggregate.py --config repos-config.local.json
aggregate:
@echo "Aggregating documentation from locked source repositories..."
python3 src/aggregate.py
aggregate-update:
@echo "Aggregating documentation from latest source repositories..."
python3 src/aggregate.py --update-locks
aggregate-repo:
@if [ -z "$(REPO)" ]; then \
echo "Error: REPO variable not set"; \
echo "Usage: make aggregate-repo REPO=gardenlinux"; \
exit 1; \
fi
@echo "Aggregating documentation for locked repository: $(REPO)"
python3 src/aggregate.py --repo $(REPO)
aggregate-update-repo:
@if [ -z "$(REPO)" ]; then \
echo "Error: REPO variable not set"; \
echo "Usage: make aggregate-update-repo REPO=gardenlinux"; \
exit 1; \
fi
@echo "Aggregating documentation for locked repository: $(REPO)"
python3 src/aggregate.py --update-locks --repo $(REPO)
# Utilities
clean:
@echo "Cleaning build artifacts and aggregated docs..."
rm -rf docs/.vitepress/dist
rm -rf docs/.vitepress/cache
rm -rf docs/projects
@# Clean aggregated (untracked) content from section directories, preserving git-tracked files
@if [ -d .git ]; then \
git clean -fdX docs/contributing/ docs/explanation/ docs/how-to/ docs/reference/ docs/tutorials/ 2>/dev/null || true; \
else \
rm -rf docs/contributing docs/explanation docs/how-to docs/reference docs/tutorials; \
fi
@echo "Clean complete!"