-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
119 lines (97 loc) · 2.98 KB
/
Copy pathMakefile
File metadata and controls
119 lines (97 loc) · 2.98 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
.PHONY: help build clean test check fmt lint install release-dev release
# Default target
help:
@echo "Fishez Build & Release Scripts"
@echo ""
@echo "Available targets:"
@echo " build - Build project in debug mode"
@echo " release - Build optimized release version"
@echo " release-dev - Build debug release version"
@echo " check - Run cargo check (type checking)"
@echo " test - Run all tests"
@echo " test-integration - Run integration tests only"
@echo " test-unit - Run unit tests only"
@echo " fmt - Format code with rustfmt"
@echo " fmt-check - Check code formatting"
@echo " clippy - Run clippy linter"
@echo " tree-check - Validate dependency tree with cargo tree"
@echo " docs - Build and open API documentation"
@echo " doc-html - Build HTML documentation"
@echo " doc-check - Check if docs build without errors"
@echo " install - Install fishez binary"
@echo " uninstall - Uninstall fishez binary"
@echo " release-ci - Run all CI checks"
@echo " clean - Clean build artifacts"
@echo " clean-all - Clean all artifacts including cache"
@echo " update - Update dependencies"
@echo " outdated - Check for outdated dependencies"
# Build project
build:
cargo build
# Build optimized release version
release:
cargo build --release
# Build debug release version
release-dev:
cargo build --release
# Run cargo check
check:
cargo check
# Run all tests
test:
cargo test
# Run integration tests
test-integration:
cargo test --test integration_flows
# Run unit tests
test-unit:
cargo test --lib
# Format code
fmt:
cargo fmt
# Check code formatting
fmt-check:
cargo fmt -- --check
# Run clippy linter
clippy:
cargo clippy --all-targets --all-features -- -D warnings
# Validate dependency tree
tree-check:
cargo tree
# Build and open documentation
docs:
cargo doc --no-deps --open
# Build HTML documentation
doc-html:
cargo doc --no-deps --document-private-items
# Check if docs build without errors
doc-check:
cargo doc --no-deps --document-private-items --quiet
# Install fishez binary + fz shell function
install:
cargo install --path .
@RC="$$HOME/.zshrc"; case "$$SHELL" in */bash) RC="$$HOME/.bashrc";; esac; \
if ! grep -q "fishez --init" "$$RC" 2>/dev/null; then \
printf '\neval "$$(fishez --init)" # fz: fishez wrapper that cds to the last viewed dir\n' >> "$$RC"; \
echo "Added fz shell function to $$RC (open a new shell to use it)."; \
fi
# Uninstall fishez binary
uninstall:
cargo install --path . --uninstall
# Run all CI checks
release-ci: tree-check fmt-check check clippy test doc-check
@echo "✓ All CI checks passed!"
# Clean build artifacts
clean:
cargo clean
# Clean all artifacts including cache
clean-all:
cargo clean
rm -f favorites.txt err.txt log.txt
rm -rf target/
# Update dependencies
update:
cargo update
# Check for outdated dependencies
outdated:
cargo outdated