-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
80 lines (61 loc) · 2.2 KB
/
Makefile
File metadata and controls
80 lines (61 loc) · 2.2 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
# Makefile for github_app
# Used by CI/CD workflows and local development
.PHONY: help
help: ## Show this help message
@echo "Available targets:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}'
# ============================================================================
# CI Targets (used by GitHub Actions)
# ============================================================================
.PHONY: ci-lint
ci-lint: ## Run clippy linting for CI (strict mode)
cargo clippy --all-targets --all-features -- -D warnings
.PHONY: ci-test
ci-test: ## Run tests for CI with all features
cargo test --all-features
.PHONY: ci-security
ci-security: ## Run security audit (requires cargo-audit)
cargo audit
# ============================================================================
# Development Targets
# ============================================================================
.PHONY: test
test: ## Run tests
cargo test --all-features
.PHONY: lint
lint: ## Run clippy linting
cargo clippy --all-targets --all-features
.PHONY: fmt
fmt: ## Format code
cargo fmt --all
.PHONY: fmt-check
fmt-check: ## Check code formatting
cargo fmt --all -- --check
.PHONY: check
check: ## Run cargo check
cargo check --all-targets --all-features
.PHONY: build
build: ## Build the library
cargo build --all-features
.PHONY: doc
doc: ## Build and open documentation
cargo doc --no-deps --all-features --open
.PHONY: clean
clean: ## Clean build artifacts
cargo clean
rm -rf certs/
# ============================================================================
# Publishing
# ============================================================================
.PHONY: publish-check
publish-check: ## Check if package can be published (dry-run)
cargo publish --dry-run --allow-dirty
.PHONY: publish
publish: ## Publish to crates.io
cargo publish
# ============================================================================
# Convenience Targets
# ============================================================================
.PHONY: pre-commit
pre-commit: fmt-check lint test ## Run pre-commit checks (format, lint, test)
@echo "✅ All pre-commit checks passed!"