-
-
Notifications
You must be signed in to change notification settings - Fork 962
Expand file tree
/
Copy pathtasks.toml
More file actions
165 lines (137 loc) · 4.16 KB
/
tasks.toml
File metadata and controls
165 lines (137 loc) · 4.16 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
#:schema ./schema/mise-task.json
[clean]
description = 'Clean build artifacts'
run = 'cargo clean'
[release]
description = 'Release the project'
run = 'cargo release --exclude-unchanged'
[signal-test]
description = 'Test signal handling in Node.js'
run = 'node ./test/fixtures/signal-test.js'
[ci]
depends = ["format", "build", "test"]
description = "Run all CI checks"
[lint]
description = 'Run all lint checks'
depends = ['lint:*']
[build]
alias = "b"
run = "cargo build --all-features"
run_windows = "cargo build"
description = "Build the project"
#sources = ["Cargo.*", "src/**/*.rs"]
#outputs = ["target/debug/mise"]
[docs]
description = 'Start the documentation development server'
depends = ['docs:setup']
run = "bun run docs:dev"
["docs:setup"]
description = 'Install documentation dependencies'
run = "bun i"
["docs:build"]
description = 'Build the documentation site'
depends = ["docs:setup"]
run = "bun run docs:build"
["docs:preview"]
description = 'Preview the documentation site'
depends = ["docs:build"]
run = "bun run docs:preview"
["docs:demos"]
description = "Create recordings with vhs"
dir = "docs"
run = """
#!/usr/bin/env bash
if ! docker info > /dev/null 2>&1; then
echo "This script uses docker, and it isn't running - please start docker and try again!"
exit 1
fi
vhs() {
docker run --rm -v $(pwd)/tapes/:/data -w /data ghcr.io/charmbracelet/vhs "$@"
}
# Create VHS recordings of all tape files in the assets directory
for i in $(ls -1 tapes/*.tape); do
vhs $(basename $i .tape).tape
done
"""
["render:usage"]
description = 'Generate usage documentation'
depends = ["build"]
env = { CLICOLOR_FORCE = "0" }
run = [
"mise usage > mise.usage.kdl",
"mise generate task-docs > tasks.md",
"rm -rf docs/cli && mkdir -p docs/cli",
"usage generate markdown -m --out-dir docs/cli --url-prefix /cli --html-encode --file mise.usage.kdl --replace-pre-with-code-fences",
"markdownlint --fix docs/cli",
]
["render:completions"]
description = 'Generate shell completions'
depends = ["build"]
wait_for = ["render:usage"]
env = { NO_COLOR = "1" }
run = '''
#!/usr/bin/env bash
set -xeuo pipefail
mise completion bash > completions/mise.bash
mise completion zsh > completions/_mise
mise completion fish > completions/mise.fish
mise completion powershell > completions/mise.ps1
'''
["render:mangen"]
description = 'Generate man pages'
depends = ["render:usage"]
env = { NO_COLOR = "1" }
run = "usage generate manpage --file mise.usage.kdl > man/man1/mise.1"
["render:fig"]
description = 'Generate Fig completion spec'
wait_for = ["render:completions"]
run = [
"usage generate fig --file mise.usage.kdl --out-file xtasks/fig/src/mise.ts",
"tsx xtasks/fig/addCustomGenerators.ts xtasks/fig/src/mise.ts xtasks/fig/src/mise.ts",
"bun run lint-fig:fix",
]
depends = ['docs:setup']
["render:help"]
description = 'Render help documentation'
depends = ["build"]
env = { NO_COLOR = "1" }
sources = ["mise"]
outputs = ["README.md"]
run = [
"mise render-help",
"mise run show-output-on-failure -- mise x node@latest -- npx markdown-magic",
]
[render]
description = 'Run all render tasks'
depends = ["render:*"]
[snapshots]
description = "update test snapshots"
run = "cargo insta test --all-features --accept --unreferenced delete"
[test]
description = "run all tests"
alias = 't'
run = ["mise tasks run test:unit", "mise tasks run test:e2e"]
["test:unit"]
description = "run unit tests"
run = "cargo test --all-features"
env = { CARGO_TERM_COLOR = "always", "RUST_TEST_THREADS" = "1" }
["test:shuffle"]
description = 'Run tests with shuffling enabled'
run = 'cargo +nightly test --all-features -- -Z unstable-options --shuffle'
[install-dev]
description = 'Install the current project in debug mode'
run = 'cargo install --path . --debug'
[xxx]
hide = true
tools = { gh = "2.60.0" }
run = "echo {{arg(name='greeting')}}; sleep 2; echo 2; sleep 2; echo 3; sleep 0.4; echo 4; sleep 1"
description = "a task for testing"
[pre-commit]
description = 'Run pre-commit hooks'
env = { PRE_COMMIT = 1 }
run = ["mise run lint"]
[flamegraph]
description = 'Generate a flamegraph for performance analysis'
tools = { "cargo:flamegraph" = "latest" }
env = { CARGO_PROFILE_RELEASE_DEBUG = "true" }
run = 'cargo flamegraph'