-
Notifications
You must be signed in to change notification settings - Fork 335
/
tasks.toml
139 lines (115 loc) · 4.31 KB
/
tasks.toml
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
#:schema ./schema/mise-task.json
clean = "cargo clean"
release = "cargo release"
signal-test = "node ./test/fixtures/signal-test.js"
ci = { depends = ["format", "build", "test"] }
pre-commit = { depends = ["render", "lint"] }
lint = { depends = ["lint:*"] }
[build]
alias = "b"
run = "cargo build --all-features"
run_windows = "cargo build --features clap_mangen"
#sources = ["Cargo.*", "src/**/*.rs"]
#outputs = ["target/debug/mise"]
[docs]
depends = ["docs:setup"]
dir = "docs"
run = "bun run docs:dev"
["docs:setup"]
dir = "docs"
run = ["cd .. && bun i", "bun i"]
["docs:build"]
depends = ["docs:setup"]
dir = "docs"
run = "bun run docs:build"
["render:usage"]
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"]
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
'''
["render:registry"]
depends = ["build"]
run = "./scripts/render-registry.js"
["render:settings"]
run = "tsx xtasks/render/settings.ts"
depends = ['docs:setup']
["render:mangen"]
depends = ["build"]
env = { NO_COLOR = "1" }
run = "mise render-mangen"
["render:fig"]
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",
]
depends = ['docs:setup']
["render:help"]
depends = ["build"]
env = { NO_COLOR = "1" }
run = [
"mise render-help",
"mise run show-output-on-failure -- mise x node@latest -- npx markdown-magic",
]
sources = ["mise"]
outputs = ["README.md"]
[render]
alias = "render"
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" }
["docker:image"]
hide = true # docker stuff is not working correctly right now
description = "build docker image from Dockerfile"
run = 'docker build --build-arg GITHUB_TOKEN=$GITHUB_API_TOKEN $root -f $root/packaging/dev/Dockerfile -t ghcr.io/jdx/mise:dev'
["docker:run"]
hide = true # docker stuff is not working correctly right now
description = "run a command inside of development docker container"
run = 'docker run -ti --rm -e GITHUB_API_TOKEN -e TEST_ALL -v $root:/mise -v /tmp/mise/target:/tmp/mise/target -v /tmp/mise/registry:/tmp/mise/registry -w /mise ghcr.io/jdx/mise:dev'
depends = ["docker:image"]
["docker:cargo"]
hide = true # docker stuff is not working correctly right now
description = "run cargo inside of development docker container"
run = 'mise tasks run docker:run cargo'
["docker:mise"]
hide = true # docker stuff is not working correctly right now
description = "run mise inside of development docker container"
run = "mise tasks run -- docker:cargo run --"
["docker:e2e"]
hide = true # docker stuff is not working correctly right now
description = "run e2e tests inside of development docker container"
run = "mise tasks run docker:mise run test:e2e"
["test:shuffle"]
run = "cargo +nightly test --all-features -- -Z unstable-options --shuffle"
[install-dev]
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"