-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjustfile
69 lines (55 loc) · 1.2 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
default:
just --list
all: build test clippy fmt-check forbid readme
alias f := fmt
alias r := run
[group: 'misc']
build:
cargo build
[group: 'check']
check:
cargo check
[group: 'check']
clippy:
cargo clippy --all-targets --all-features
[group: 'format']
fmt:
cargo +nightly fmt
[group: 'check']
fmt-check:
cargo +nightly fmt --all -- --check
@echo formatting check done
[group: 'check']
forbid:
./bin/forbid
[group: 'release']
publish:
#!/usr/bin/env bash
set -euxo pipefail
rm -rf tmp/release
gh repo clone https://github.com/terror/present tmp/release
cd tmp/release
VERSION=`sed -En 's/version[[:space:]]*=[[:space:]]*"([^"]+)"/\1/p' Cargo.toml | head -1`
git tag -a $VERSION -m "Release $VERSION"
git push origin $VERSION
cargo publish
cd ../..
rm -rf tmp/release
[group: 'dev']
run *args:
cargo run -- {{args}}
[group: 'misc']
readme:
cargo run -- README.md --in-place
[group: 'test']
test *args:
cargo test --all-targets {{args}}
[group: 'test']
test-release-workflow:
-git tag -d test-release
-git push origin :test-release
git tag test-release
git push origin test-release
[group: 'dev']
watch +COMMAND='test':
cargo watch --clear --exec "{{COMMAND}}"