-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (49 loc) · 1.66 KB
/
Makefile
File metadata and controls
62 lines (49 loc) · 1.66 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
.PHONY: build test check fmt clippy deny codegen coverage release vanilla-start vanilla-stop vanilla-logs vanilla-attach
## Build all crates
build:
cargo build --all-targets
## Run all tests
test:
cargo test --all-features
## Run fmt + clippy + test
check: fmt clippy test
## Check formatting
fmt:
cargo fmt --all --check
## Run clippy lints
clippy:
cargo clippy --all-targets --all-features -- -D warnings
## Run cargo-deny (advisories + licenses)
deny:
cargo deny check
## Generate protocol packets from minecraft-data
codegen:
cargo run --package xtask -- codegen
cargo fmt --all
## Run coverage report locally
coverage:
cargo llvm-cov --all-features --fail-under-lines 90 --ignore-filename-regex "(examples|packets/)"
## Cut a release: bump version, update changelog, commit, tag
## Usage: make release VERSION=0.2.0
release:
@test -n "$(VERSION)" || (echo "Usage: make release VERSION=x.y.z" && exit 1)
@echo "Releasing v$(VERSION)..."
sed -i.bak 's/^version = ".*"/version = "$(VERSION)"/' Cargo.toml && rm Cargo.toml.bak
cargo check --workspace --lib --bins --examples
git-cliff --tag "v$(VERSION)" --output CHANGELOG.md
git add Cargo.toml CHANGELOG.md
git commit -m "chore(workspace): release v$(VERSION)"
git tag "v$(VERSION)"
@echo "Done. Run 'git push && git push --tags' to trigger the release workflow."
## Start vanilla 1.21.4 server on port 25566 (for protocol comparison)
vanilla-start:
docker compose up -d
## Stop vanilla server
vanilla-stop:
docker compose down
## Show vanilla server logs
vanilla-logs:
docker compose logs -f minecraft
## Attach to vanilla server console (Ctrl+P Ctrl+Q to detach)
vanilla-attach:
docker attach basalt-minecraft-1