forked from rmja/drone-stm32f4-hal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Justfile
33 lines (26 loc) · 762 Bytes
/
Justfile
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
features := 'dma exti fmc gpio rcc tim uart spi'
target := `drone print target 2>/dev/null || echo ""`
# Install dependencies
deps:
type cargo-readme >/dev/null || cargo +stable install cargo-readme
type drone >/dev/null || cargo install drone
rustup target add {{target}}
# Reformat the source code
fmt:
cargo fmt
# Check the source code for mistakes
lint:
cargo clippy --features "{{features}}"
# Build the documentation
doc:
cargo doc --features "{{features}}"
# Open the documentation in a browser
doc-open: doc
cargo doc --features "{{features}}" --open
# Run the tests
test:
cargo test --features "std {{features}}" \
--target=$(rustc --version --verbose | sed -n '/host/{s/.*: //;p}')
# Update README.md
readme:
cargo readme -o README.md