-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmise.toml
More file actions
70 lines (59 loc) · 1.93 KB
/
Copy pathmise.toml
File metadata and controls
70 lines (59 loc) · 1.93 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
[tools]
"github:crate-ci/cargo-release" = "1.1.2"
"aqua:nushell/nushell" = "0.113.0"
[tools.rust]
version = "1.95.0"
profile = "default"
components = "rust-analyzer,rustfmt,clippy"
[tools."github:dahlia/hongdown"]
version = "0.5.1"
[tools."github:dahlia/hongdown".platforms]
linux-x64 = "hongdown-*-x86_64-unknown-linux-musl.tar.bz2"
linux-arm64 = "hongdown-*-aarch64-unknown-linux-musl.tar.bz2"
[tasks.check]
description = "Run type check, lint, and check Markdown format"
run = [
"cargo check",
"cargo clippy",
"cargo fmt --check",
"hongdown --check",
"mise fmt --check",
]
[tasks.fmt]
description = "Format code and docs"
run = ["cargo fmt", "hongdown --write", "mise fmt"]
[tasks.test]
description = "Run the Rust tests"
run = "cargo test --workspace"
[tasks.bump]
description = "Preview a workspace version bump"
usage = 'arg "<version>" help="Target release version, e.g. 1.2.5"'
run = 'cargo release --workspace --no-publish --no-tag --no-push "$usage_version"'
[tasks.bump-execute]
description = "Create one commit bumping the workspace version"
usage = 'arg "<version>" help="Target release version, e.g. 1.2.5"'
run = 'cargo release --workspace --no-publish --no-tag --no-push --execute --no-confirm "$usage_version"'
[tasks.publish-version]
description = "Restamp Cargo manifests for a CI publish version"
usage = 'arg "<version>" help="Exact package version to publish"'
shell = "nu -c"
run = """
let publish_version = $env.usage_version
let dependency_version = ($publish_version | split row "+" | first)
let crate_names = (
cargo metadata --no-deps --format-version 1
| from json
| get packages.name
)
let manifest = (
open Cargo.toml
| upsert workspace.package.version $publish_version
)
let manifest = (
$crate_names
| reduce --fold $manifest {|crate, acc|
$acc | upsert (["workspace" "dependencies" $crate "version"] | into cell-path) $dependency_version
}
)
($manifest | to toml) + "\n" | save --force Cargo.toml
"""