-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathTaskfile.yml
More file actions
101 lines (83 loc) · 2.47 KB
/
Taskfile.yml
File metadata and controls
101 lines (83 loc) · 2.47 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
version: "3"
dotenv: [".env"]
tasks:
install:
cmds:
- uv sync --dev
- uv run pre-commit install
run:
dir: clerk_api_demo
cmds:
- uv run reflex run
run-docs:
cmds:
# Use non-default port to not clash with reflex backend
- uv run mkdocs serve -a localhost:9000
test:
deps:
- task: lint
- task: typecheck
cmds:
- uv sync --dev
- uv run playwright install chromium
- uv run pytest
lint:
cmds:
- uv run ruff check .
typecheck:
cmds:
- uv run pyright
bump-patch:
desc: Bump patch version (e.g., 1.1.3 -> 1.1.4)
cmds:
- uvx hatch version patch
- uv lock
bump-minor:
desc: Bump minor version (e.g., 1.1.3 -> 1.2.0)
cmds:
- uvx hatch version minor
- uv lock
bump-major:
desc: Bump major version (e.g., 1.1.3 -> 2.0.0)
cmds:
- uvx hatch version major
- uv lock
publish:
preconditions:
- sh: git status
cmds:
- git diff --quiet --staged || (echo "There are staged changes. They must be committed first" && exit 1)
- git diff --quiet || (echo "There are unstaged changes. They must be committed first." && exit 1)
- uvx hatch version | xargs -I {} git tag -a v{} -m "Release v{}"
- git push --follow-tags
pre-commit-all:
cmds:
- uv run pre-commit run --all-files
pre-commit-update:
cmds:
- uv run pre-commit autoupdate
build-component:
desc: Build the reflex component (generates .pyi stubs and package dist)
cmds:
# Generate .pyi files from custom_components to avoid scanning tests/demo dirs
# This is the same as what `reflex component build` does, but selective to avoid
# scanning tests/demo directories which causes ModuleNotFoundError (issue #5114)
- cd custom_components && uv run python -m reflex.utils.pyi_generator reflex_clerk_api
# Build package using uv's native build command (works in GHA without installing build separately)
- uv build
manual-publish:
preconditions:
# Check environment variable
- sh: test -n "$PYPI_TOKEN"
msg: "PYPI_TOKEN is not set -- Add PYPI_TOKEN=... to .env file"
cmds:
- echo "Publishing to PyPI"
- task: build-component
- uv publish --token $PYPI_TOKEN
manual-publish-docs:
cmds:
- uv run mkdocs gh-deploy --force
share:
desc: Share the component via the reflex library
cmds:
- uv run reflex component share