just: export requirements when building a release
So others do not have to use "uv"
This commit is contained in:
parent
ab355ddc06
commit
8894a4d321
1 changed files with 9 additions and 5 deletions
14
justfile
14
justfile
|
|
@ -1,6 +1,9 @@
|
|||
the_app := "teilchensammler_cli.main"
|
||||
uv_export_options := "--frozen --format requirements.txt --quiet --no-install-project"
|
||||
releasenotes := "releasenotes.md"
|
||||
requirements_file := "requirements.txt"
|
||||
dev_requirements_file := "requirements.dev.txt"
|
||||
pyproject := "pyproject.toml"
|
||||
|
||||
[private]
|
||||
default:
|
||||
|
|
@ -29,8 +32,8 @@ update-deps:
|
|||
|
||||
# export dependencies into requirements files
|
||||
exports-deps:
|
||||
uv export {{ uv_export_options }} --output-file requirements.txt
|
||||
uv export {{ uv_export_options }} --output-file requirements.dev.txt --only-dev
|
||||
uv export {{ uv_export_options }} --output-file {{ requirements_file }}
|
||||
uv export {{ uv_export_options }} --output-file {{ dev_requirements_file }} --only-dev
|
||||
|
||||
# Run tests, ARGS are passed-through to pytest
|
||||
test *ARGS:
|
||||
|
|
@ -41,7 +44,7 @@ alltests *ARGS:
|
|||
|
||||
# run tests and create coverage reports
|
||||
coverage:
|
||||
uv run pytest tests.py -m "not final" --cov=src/ --cov-report term --cov-report xml --cov-report html --cov-config pyproject.toml
|
||||
uv run pytest tests.py -m "not final" --cov=src/ --cov-report term --cov-report xml --cov-report html --cov-config {{ pyproject }}
|
||||
|
||||
# lint python, markdown, wheel file names, prek config
|
||||
lint:
|
||||
|
|
@ -55,7 +58,8 @@ release *release_name:
|
|||
test -f {{ releasenotes }}; and set -l body "$(cat {{ releasenotes }})"; or begin echo Release notes are missing!; exit 2; end
|
||||
set -l tag (uv version --short --output-format text)
|
||||
|
||||
git add pyproject.toml uv.lock
|
||||
just exports-deps
|
||||
git add {{ pyproject }} uv.lock {{ requirements_file }} {{ dev_requirements_file }}
|
||||
git commit -m "Release version $tag"
|
||||
git tag "v$tag"
|
||||
|
||||
|
|
@ -65,7 +69,7 @@ release *release_name:
|
|||
just build
|
||||
|
||||
fj release create "v$tag: {{ release_name }}" --tag "v$tag" --attach dist/*.whl --body "$body"
|
||||
# just upload
|
||||
just upload
|
||||
mv {{ releasenotes }} {{ releasenotes }}.$tag
|
||||
|
||||
# builds a package
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue