-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathjustfile
More file actions
116 lines (91 loc) · 2.07 KB
/
justfile
File metadata and controls
116 lines (91 loc) · 2.07 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
set dotenv-load
default:
just --list
alias f := fmt
alias r := run
alias t := test
all: build test clippy fmt-check
[group: 'dev']
bench:
cargo bench
open target/criterion/report/index.html
[group: 'dev']
build:
cargo build --all --all-targets
[group: 'web']
build-wasm:
wasm-pack build crates/val-wasm --target web \
--out-name val \
--out-dir ../../www/packages/val-wasm
rm -rf www/packages/val-wasm/.gitignore
uv run --with arrg tools/example-generator/main.py examples www/src/lib/examples.ts
[group: 'check']
check:
cargo check
[group: 'check']
ci: test clippy forbid
cargo +nightly fmt --all -- --check
cargo update --locked --package val
[group: 'check']
clippy:
cargo clippy --all --all-targets
[group: 'format']
fmt:
cargo +nightly fmt
[group: 'format']
fmt-check:
cargo +nightly fmt --all -- --check
[group: 'format']
fmt-web:
cd www && prettier --write .
[group: 'check']
forbid:
./bin/forbid
[group: 'misc']
install:
cargo install -f val
[group: 'dev']
install-dev-deps:
rustup install nightly
rustup update nightly
cargo install cargo-watch
cargo install wasm-bindgen-cli
curl -fsSL https://bun.sh/install | bash
[group: 'release']
publish:
#!/usr/bin/env bash
set -euxo pipefail
rm -rf tmp/release
gh repo clone https://github.com/terror/val 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: 'misc']
readme:
present --in-place README.md
[group: 'dev']
run *args:
cargo run {{ args }}
[group: 'web']
serve-web: build-wasm
cd www && bun run dev
[group: 'test']
test:
cargo test
[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: 'release']
update-changelog:
echo >> CHANGELOG.md
git log --pretty='format:- %s' >> CHANGELOG.md
[group: 'dev']
watch +COMMAND='test':
cargo watch --clear --exec "{{COMMAND}}"