-
Notifications
You must be signed in to change notification settings - Fork 316
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (26 loc) · 1.07 KB
/
Makefile
File metadata and controls
35 lines (26 loc) · 1.07 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
.PHONY: help build test deploy deploy-skip-tests dev clean install-mdbook
help: ## Show this help message
@echo "Rust Cookbook - Available commands:"
@echo ""
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
install-mdbook: ## Install mdbook with the correct version
cargo install mdbook --vers "0.4.43"
build: install-mdbook ## Build the book locally
mdbook build
cp -r assets/ book/
@echo "Build complete! Open book/index.html in your browser."
test: ## Run all tests
cargo test
./ci/spellcheck.sh list
dev: build test ## Build and test (development workflow)
@echo "Development build complete!"
deploy: clean dev ## Deploy to GitHub Pages (requires maintainer permissions)
./scripts/deploy.sh --skip-tests
deploy-skip-tests: build ## Deploy to GitHub Pages without running tests
./scripts/deploy.sh --skip-tests
clean: ## Clean build artifacts
cargo clean
rm -rf book/
@echo "Clean complete!"
serve: install-mdbook ## Serve the book locally with live reload
mdbook serve --open