/
justfile
67 lines (52 loc) 路 1.33 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
# default to `watch`
default: watch
bt="0"
export RUST_BACKTRACE = bt
# submit a pull request
pr: fmt clippy test
@echo Checking for FIXME/TODO...
! grep --color -En 'FIXME|TODO' src/*.rs
@echo Checking for long lines...
! grep --color -En '.{101}' src/*.rs
git branch | grep '^ *master'
git diff --exit-code
git diff --cached --exit-code
git push github
# run all tests
test:
cargo test
# format rust sourcecode with rustfmt
fmt:
cargo fmt --all
# watch for changes and run `cargo fmt` and `cargo check`
watch:
cargo watch --clear --exec fmt --exec 'check --all-targets'
# check all targets
check:
cargo check --all-targets
# check for out-of-date dependencies
outdated:
cargo outdated
# build and open docs
doc:
cargo doc --open -p pxl
# everyone's favorite animate paper clip
clippy:
cargo +nightly clippy
# run the conway's game of life example
life:
cargo run --package pxl --release --example life
# run the custom shader example
shaders:
cargo run --package pxl --release --example shaders
# run pxl-mono
mono:
cargo run --package pxl-mono --release
# run all examples in sequence, useful for testing
examples: life mono shaders
# clean up the feature branch named BRANCH
done BRANCH:
git checkout master
git pull --rebase github master
git diff --no-ext-diff --quiet --exit-code {{BRANCH}} --
git branch -D {{BRANCH}}