-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (34 loc) · 1015 Bytes
/
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
banner=printf "\033[35m"; banner $@; print "\033[0m";
help: ##: Print this help menu
@echo "USAGE"
@awk -F':' '/##:/ && !/awk/ { OFS="\t"; print "make "$$1,$$3 }' Makefile \
| sort
about: ##: Print version information
@$(banner)
@cargo --version
@rustc --version
@uname -a
all: about build format test docs ##: Run the full build pipeline
build: ##: Build debug and release binaries
@$(banner)
cargo build
cargo build --tests
cargo build --examples
docs: ##: Build documentation
@$(banner)
cargo doc
format: ##: Check for code formatting issues
@$(banner)
cargo fmt -- --check
cargo clippy
.git/hooks/pre-commit:
echo "#!/bin/bash\nmake all" > .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
hook: .git/hooks/pre-commit ##: Run 'make all' as a pre-commit hook
publish: ##: Publish all crates in this workspace to crates.io
@$(banner)
cargo publish --package door-macros
cargo publish --package doors
test: build ##: Run tests against the example servers
@$(banner)
cargo test