-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjustfile
47 lines (38 loc) · 1.54 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Nushell needs to be installed
set shell := ["nu", "-c"]
shebang := if os() == 'windows' {
'nu.exe'
} else {
'/usr/bin/env nu'
}
import 'stm32cubeprogrammer-sys/justfile'
# List all the recipes
default:
just -l
sample-env-file:
#!{{shebang}}
let content = 'STM32_CUBE_PROGRAMMER_DIR = "<PATH TO STM32_CUBE_PROGRAMMER ROOT DIR>"
STM32_CUBE_PROGRAMMER_DOWNLOAD_HEX_PATH = "<PATH TO HEX FILE>"
STM32_CUBE_PROGRAMMER_DOWNLOAD_BIN_PATH = "<PATH TO BIN FILE>"
STM32_CUBE_PROGRAMMER_DOWNLOAD_BIN_START_ADDRESS = "<START ADDRESS e.g. 0x08000000>"
STM32_CUBE_PROGRAMMER_BLE_STACK_PATH = "<PATH TO BLE STACK BIN FILE>"
STM32_CUBE_PROGRAMMER_BLE_STACK_START_ADDRESS = "<START ADDRESS e.g. 0x080CE000>"'
echo $content | save .env
# Run all tests or a specific test with a specific verbosity
# The log level maps to the `log` crate log levels: trace, debug, info, warn, error
test name="" log_level="trace":
echo "Running tests..."
# Add your test commands here
RUST_LOG={{log_level}} cargo test {{name}} -- --test-threads=1 --nocapture --show-output
# Generate the changelog with git-cliff
changelog:
git-cliff | save CHANGELOG.md --force
# Run cargo-readme to update the readme files
update-readme:
cd stm32cubeprogrammer ; cargo readme | save README.md -f
cd stm32cubeprogrammer-cli ; cargo readme | save README.md -f
cd stm32cubeprogrammer-sys ; cargo readme | save README.md -f
# Release the project
# TODO: Add CI and so on
release: changelog
cargo clippy