-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
123 lines (101 loc) · 2.66 KB
/
Copy pathTaskfile.yml
File metadata and controls
123 lines (101 loc) · 2.66 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
version: '3'
vars:
VERSION:
sh: grep "^version =" pyproject.toml | cut -d '"' -f 2
VCS_REF:
sh: git rev-parse --short HEAD 2>/dev/null || echo "unknown"
RNGIT: rngit
RNGIT_CONFIG: '{{.HOME}}/.rngit'
RNS_CONFIG: '{{.HOME}}/.reticulum'
RNGIT_REMOTE:
sh: git config --get remote.origin.url
RELEASE_TAG:
sh: echo v$(poetry version -s 2>/dev/null || grep '^version =' pyproject.toml | cut -d '"' -f 2)
RELEASE_DIST: dist
tasks:
default:
desc: Show available tasks
cmds:
- task --list
build:
desc: Clean and build sdist and wheel
deps: [clean]
cmds:
- poetry run python3 -m build
sdist:
desc: Build source distribution
cmds:
- poetry run python3 -m build --sdist
wheel:
desc: Build wheel
cmds:
- poetry run python3 -m build --wheel
clean:
desc: Remove build artifacts
cmds:
- rm -rf build dist *.egg-info .pytest_cache
install:
desc: Install built wheel
deps: [build]
cmds:
- pip install dist/*.whl
install-dev:
desc: Install package in development mode
cmds:
- poetry install
lint:
desc: Run ruff linter
cmds:
- poetry run ruff check .
format:
desc: Run ruff with auto-fix
cmds:
- poetry run ruff check --fix .
check:
desc: Run code quality checks
deps: [lint]
test:
desc: Run local integration tests
cmds:
- bash tests/run_tests.sh
test-advanced:
desc: Run advanced tests via pytest
cmds:
- poetry run pytest tests/test_advanced.py
run:
desc: Run rns-page-node locally
cmds:
- poetry run python3 -m rns_page_node.main
run-dev:
desc: Run rns-page-node with DEBUG logging
cmds:
- poetry run python3 -m rns_page_node.main --log-level DEBUG
version:
desc: Show current version
cmds:
- 'echo "Version: {{.VERSION}}"'
all:
desc: Run clean, lint, test, and build
deps: [clean, check, test, build]
publish-pypi:
desc: Publish package to PyPI
deps: [build]
cmds:
- twine upload dist/*
publish:
desc: Publish package to PyPI
deps: [publish-pypi]
release-dist:
desc: Build release artifacts in dist/
deps: [build]
release-upload:
desc: Upload dist/ to rngit remote (origin)
deps: [release-dist]
cmds:
- '{{.RNGIT}} release --config {{.RNGIT_CONFIG}} --rnsconfig {{.RNS_CONFIG}} {{.RNGIT_REMOTE}} create {{.RELEASE_TAG}}:{{.RELEASE_DIST}}'
release:
desc: Build, tag, push, and upload release via rngit
deps: [release-upload]
cmds:
- git tag -a {{.RELEASE_TAG}} -m "Release {{.RELEASE_TAG}}" 2>/dev/null || true
- git push origin --follow-tags