-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathjustfile
121 lines (100 loc) · 2.51 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
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
117
118
119
120
121
watch +args='test':
cargo watch --clear --exec '{{ args }}'
ci: lint
cargo test --workspace
lint:
cargo clippy --workspace --all-targets -- --deny warnings
./bin/forbid
cargo fmt --all -- --check
outdated:
cargo outdated --workspace --root-deps-only
unused:
cargo +nightly udeps --workspace
coverage:
cargo llvm-cov --html
open target/llvm-cov/html/index.html
update-changelog:
echo >> CHANGELOG.md
git log --pretty='format:- %s' >> CHANGELOG.md
update-contributors:
cargo run --release --package update-contributors
doc:
cargo doc --all --open
tmp:
rm -rf tmp
mkdir tmp
publish: tmp
#!/usr/bin/env bash
set -euxo pipefail
git clone [email protected]:casey/filepack.git tmp
cd tmp
VERSION=`bin/version`
git tag -a $VERSION -m "Release $VERSION"
git push origin $VERSION
cargo publish
test-release-workflow:
-git tag -d test-release
-git push origin :test-release
git tag test-release
git push origin test-release
docs:
open docs/index.html
shellcheck-install-script:
shellcheck docs/install.sh
test-install-script:
rm -f tmp/filepack
./docs/install.sh --to tmp
list-package:
cargo package --list --allow-dirty
commit-release:
git commit --edit --file release-commit-message.txt
test-progress-bar: tmp
#!/usr/bin/env bash
head -c 1073741824 /dev/urandom > tmp/data0
for i in {1..9}; do
cp tmp/data0 tmp/data$i
done
cargo run --release create tmp
rm tmp/data*
check-error-variant-order: tmp
cat src/error.rs | rg '^ ([A-Z].*) \{' -or '$1' > tmp/original.txt
sort tmp/original.txt > tmp/sorted.txt
diff tmp/{original,sorted}.txt
sign-release: tmp
#!/usr/bin/env bash
set -euxo pipefail
VERSION=`bin/version`
gh release download \
--repo casey/filepack \
--pattern filepack.json \
--dir tmp \
$VERSION
cargo run sign tmp/filepack.json
gh release upload \
--clobber \
--repo casey/filepack \
$VERSION \
tmp/filepack.json
verify-release: tmp
#!/usr/bin/env bash
set -euxo pipefail
VERSION=`bin/version`
gh release download \
--repo casey/filepack \
--pattern '*' \
--dir tmp \
$VERSION
cargo run verify tmp --key 3c977ea3a31cd37f0b540f02f33eab158f2ed7449f42b05613c921181aa95b79
render: tmp
#!/usr/bin/env bash
set -euxo pipefail
VERSION=`bin/version`
gh release download \
--repo casey/filepack \
--pattern '*' \
--dir tmp \
$VERSION
rm tmp/filepack.json
cargo run create tmp --sign --metadata metadata.yaml
cargo run render tmp > tmp/index.html
open tmp/index.html