-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathJustfile
More file actions
46 lines (35 loc) · 1.08 KB
/
Copy pathJustfile
File metadata and controls
46 lines (35 loc) · 1.08 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
default: test clippy format
test:
@cargo test -- --ignored --nocapture
clippy:
@cargo clippy --all-targets --all-features --tests -q
@cargo clippy --all-targets --no-default-features -q
format:
@cargo +nightly fmt --all -- --config-path .config/rustfmt.toml
@taplo format --config .config/taplo.toml
fmt: format
f: fmt
fix: clippy-fix format
clippy-fix:
@cargo clippy --all-targets --all-features --tests --fix -q --allow-dirty
@cargo clippy --all-targets --no-default-features --fix -q --allow-dirty
install:
@cargo install --locked --path .
release:
#!/usr/bin/env bash
set -e
# Extract vesrion from Cargo.toml using perl
version=$(perl -ne 'if (/version\s*=\s*"([^"]+)"/) { print $1; exit }' Cargo.toml)
tag="v$version"
echo "Releasing $version"
# Create tag if not yet exists
if ! git tag -l "$tag" | grep -q .; then
echo "Please sign the tag: $tag"
git tag -s -m "$version" $tag
else
echo "Tag $tag already exists"
fi
# Push tag
read -p "Do you want to release $version [y/N] " confirm
[[ "$confirm" == [yY] ]] || { echo "Aborted."; exit 1; }
git push origin $tag