-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
74 lines (63 loc) · 1.54 KB
/
Taskfile.yml
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
version: '3'
includes:
py: ./python_packages/Taskfile.yml
tasks:
bumpver-patch:
deps:
- fmt
- lint
- test
sources:
- python_packages/**/*.py
- python_packages/**/data/*.onnx
# - python_packages/**/pyproject.toml
# - pyproject.toml
cmds:
- uv run --offline bumpver update --no-fetch --patch {{ .CLI_ARGS }}
- uv sync
bumpver-minor:
deps:
- bumpver-patch
sources:
- python_packages/**/*.py
# I cannot use the pyproject as a source bc...
# since this command changes the pyproject.toml
# It creates a "never up to date loop"
# - python_packages/**/pyproject.toml
# - pyproject.toml
cmds:
- uv run bumpver update --minor {{ .CLI_ARGS }}
- uv sync
build:
deps:
- bumpver-patch
cmds:
- task: py:build
publish:
deps:
- build
cmds:
- task: py:publish
gh-release:
desc: Create a new GitHub release with built wheels
deps:
- build
cmds:
- |
VERSION=$(uv run bumpver show | grep "Current Version:" | cut -d ":" -f2 | tr -d ' ')
if [ -z "$VERSION" ]; then
echo "Failed to get version from bumpver"
exit 1
fi
echo "Creating release for version: ${VERSION}"
gh release create "v${VERSION}" ./python_packages/dist/*.whl --title "v${VERSION}" --notes "Release ${VERSION}"
silent: false
fmt:
cmds:
- task: py:fmt
lint:
cmds:
- task: py:lint
test:
cmds:
- task: py:test