-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (35 loc) · 1.34 KB
/
Makefile
File metadata and controls
44 lines (35 loc) · 1.34 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
BUMP_TYPE?=patch
.PHONY: help release release-minor release-major release-patch test lint lint-fix
help:
@echo "Available targets:"
@echo " make test - Run all tests"
@echo " make lint - Run formatting and clippy checks"
@echo " make lint-fix - Auto-fix formatting and clippy issues"
@echo " make release - Release with patch version bump (default)"
@echo " make release-minor - Release with minor version bump"
@echo " make release-major - Release with major version bump"
@echo " make release-patch - Release with patch version bump"
@echo ""
@echo "Variables:"
@echo " BUMP_TYPE=<patch|minor|major> - Override version bump type"
release:
cargo release $(BUMP_TYPE) --execute
release-minor:
$(MAKE) release BUMP_TYPE=minor
release-major:
$(MAKE) release BUMP_TYPE=major
release-patch:
$(MAKE) release BUMP_TYPE=patch
test:
RUST_TEST_NOCAPTURE=1 RUST_TEST_THREADS=1 RUST_BACKTRACE=1 cargo test
lint:
@echo "Running cargo fmt check..."
@cargo fmt --all -- --check
@echo "\nRunning clippy..."
@cargo clippy --all-targets --all-features -- -D warnings
lint-fix:
@echo "Running cargo fmt..."
@cargo fmt --all
@echo "\nRunning clippy with auto-fix..."
@cargo clippy --fix --allow-dirty --allow-staged --all-targets --all-features
@echo "\nLinting complete! Please review changes."