-
Notifications
You must be signed in to change notification settings - Fork 19
/
justfile
45 lines (38 loc) · 1.17 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
check:
cargo fmt -- --check
cargo clippy
pedantic:
cargo fmt -- --check
cargo clippy -- -W clippy::pedantic
fmt:
cargo fmt
fix:
cargo clippy --fix
pedantic_fix:
cargo clippy --fix -- -W clippy::pedantic
[doc('Bump version in Cargo.toml')]
[group('maintainer')]
bumpversion VERSION:
#!/usr/bin/env bash
VERSION="{{ trim_start_match(VERSION, "v") }}"
shopt -s expand_aliases
alias set-version='cargo set-version --package marmite --locked'
set-version "$VERSION" || cargo install -y [email protected] && set-version "$VERSION"
cargo generate-lockfile
just fmt
git add ./Cargo.toml ./Cargo.lock
git commit -m "chore: bump version to $VERSION"
[doc('Push a new tag to the repository')]
[group('maintainer')]
pushtag TAG:
#!/usr/bin/env bash
VERSION="{{ trim_start_match(TAG, "v") }}"
git push origin :refs/tags/$VERSION # delete the origin tag
git tag -d $VERSION # delete the local tag
git tag -a "$VERSION" -m "chore: push $VERSION"
git push origin $VERSION
[doc('Publish a new version (bumpversion + pushtag)')]
[group('maintainer')]
publish TAG:
just bumpversion {{ TAG }}
just pushtag {{ TAG }}