-
Notifications
You must be signed in to change notification settings - Fork 10
/
tasks.toml
57 lines (49 loc) · 1.76 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
# SPDX-FileCopyrightText: 2022 Carnegie Mellon University
# SPDX-License-Identifier: 0BSD
[tool.poe.tasks.version]
help = "Show current version"
cmd = "poetry run tbump current-version"
[tool.poe.tasks.build]
help = "Build sdist and wheel"
cmd = "poetry build"
[tool.poe.tasks.check]
help = "Run pre-commit and unit tests"
sequence = [
"poetry run pre-commit run -a",
"poetry run mypy",
"poetry run pytest",
]
default_item_type = "cmd"
[tool.poe.tasks.update-dependencies]
help = "Update dependencies"
sequence = [
{cmd = "poetry update"},
{cmd = "poetry run pre-commit autoupdate"},
{ref = "check"},
{cmd = "git commit --no-verify -m 'Update dependencies' poetry.lock .pre-commit-config.yaml"},
]
[tool.poe.tasks.tag-release]
help = "Bump version, build, and create a release tag"
cmd = "poetry run tbump --no-push ${version}"
args = [{name = "version", positional = true, required=true}]
[tool.poe.tasks._ensure_version]
shell = "test $(poetry run tbump current-version) = ${version}"
args = [{name = "version", positional = true, required=true}]
[tool.poe.tasks.publish]
help = "Publish release to pypi and git, bump to post-release version"
sequence = [
{ref = "_ensure_version ${version}"},
{cmd = "poetry publish"},
{cmd = "poetry run tbump --non-interactive --only-patch ${version}.post.dev0"},
{cmd = "git add --update"},
{cmd = "git commit --no-verify --message 'Bumping to ${version}.post.dev0'"},
{cmd = "git push --atomic origin main v${version}"},
]
args = [{name = "version", positional = true, required = true}]
[tool.poe.tasks.release]
help = "Update to release version, build, tag, and publish"
sequence = [
"tag-release ${version}",
"publish ${version}"
]
args = [{name = "version", positional = true, required = true}]