-
Notifications
You must be signed in to change notification settings - Fork 1
/
justfile
41 lines (34 loc) · 938 Bytes
/
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
# List available recipes.
help:
@just -l
# Run all tests with nextest
test:
@cargo nextest run
# Lint and stuff.
ci:
@cargo fmt
@cargo clippy
@cargo nextest run
# Build docs and open them in your browser.
docs:
@cargo doc --no-deps --open
# Install the tool into .cargo/bin
install:
@cargo install --path .
# Use tomato to set the crate version to the passed in version, commit,
# and create a git tag `v{version}`. Will not act if there are uncommitted
# changes extant.
# Set the crate version and tag the repo to match.
tag VERSION:
#!/usr/bin/env bash
status=$(git status --porcelain)
if [ "$status" != "" ]; then
echo "There are uncommitted changes! Cowardly refusing to act."
exit 1
fi
cargo run --quiet -- set package.version {{VERSION}} Cargo.toml
# update the lock file
cargo check
git commit Cargo.toml Cargo.lock -m "{{VERSION}}"
git tag "{{VERSION}}"
echo "Release tagged for version {{VERSION}}"