-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
54 lines (45 loc) · 1.13 KB
/
Taskfile.yml
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
version: "3"
tasks:
test:
cmds:
- cargo test --all-features
bench:
cmds:
- cargo bench --all-features
check.clippy:
cmds:
- cargo clippy --all-targets --all-features -- -D warnings
fix.clippy:
cmds:
- cargo clippy --all-targets --all-features --fix --allow-staged
check.fmt:
cmds:
- cargo fmt --check
fix.fmt:
cmds:
- cargo fmt
check:
cmds:
- task: test
- task: check.clippy
- task: check.fmt
publish:
requires:
vars:
- name: MODE
enum: [patch, minor, major]
cmds:
- task: check
- task: check.uncommitted-changes
- cargo bump {{.MODE}}
- cargo publish --all-features --dry-run --allow-dirty
- git add --all
- git commit -m "Bump version v$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[0].version')"
- git tag "v$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[0].version')"
- cargo publish --all-features
- git push
- git push --tags
check.uncommitted-changes:
internal: true
cmds:
- "[[ -z $(git status -s) ]]"