-
Notifications
You must be signed in to change notification settings - Fork 22
/
Makefile
68 lines (54 loc) · 1.18 KB
/
Makefile
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
default: build
setup:
@echo "Setting up $(NAME)"
@echo "Installing git hooks"
@mkdir -p .git/hooks
@echo "make fix" > .git/hooks/pre-commit
@chmod +x .git/hooks/pre-commit
@echo "installing convco..."
@cargo install convco
@echo "make check-commits" > .git/hooks/pre-push
@chmod +x .git/hooks/pre-push
@echo "Done"
clean:
@echo "Cleaning build dir"
@rm -rf target/*
@echo "Cleaning using cargo"
@cargo clean
check:
@echo "Checking $(NAME)"
@cargo check
release:
@echo "Building release: $(VERSION)"
@cargo build --release
build:
@echo "Building debug"
@cargo build
format:
@echo "Formatting $(NAME)"
@cargo fmt --all
lint:
@echo "Linting $(NAME)"
@cargo clippy
fix: format
@echo "Fixing $(NAME)"
@cargo fix --allow-staged --allow-dirty
@make lint
run:
@echo "Running debug"
@RUST_LOG=debug cargo run
test:
@echo "Testing $(NAME)"
@cargo test --all
bump-workspace:
@echo "Bumping workspace"
@./scripts/bump.sh
publish:
@echo "Publishing $(NAME)"
@./scripts/publish.sh
update-changelog:
@echo "Updating changelog"
@git cliff -o CHANGELOG.md
check-commits:
@echo "Checking commits (see https://www.conventionalcommits.org/)"
@convco check origin/main..HEAD