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"
|
the_app := "teilchensammler_cli.main"
|
||||||
uv_export_options := "--frozen --format requirements.txt --quiet --no-install-project"
|
uv_export_options := "--frozen --format requirements.txt --quiet --no-install-project"
|
||||||
releasenotes := "releasenotes.md"
|
releasenotes := "releasenotes.md"
|
||||||
|
requirements_file := "requirements.txt"
|
||||||
|
dev_requirements_file := "requirements.dev.txt"
|
||||||
|
pyproject := "pyproject.toml"
|
||||||
|
|
||||||
[private]
|
[private]
|
||||||
default:
|
default:
|
||||||
|
|
@ -29,8 +32,8 @@ update-deps:
|
||||||
|
|
||||||
# export dependencies into requirements files
|
# export dependencies into requirements files
|
||||||
exports-deps:
|
exports-deps:
|
||||||
uv export {{ uv_export_options }} --output-file requirements.txt
|
uv export {{ uv_export_options }} --output-file {{ requirements_file }}
|
||||||
uv export {{ uv_export_options }} --output-file requirements.dev.txt --only-dev
|
uv export {{ uv_export_options }} --output-file {{ dev_requirements_file }} --only-dev
|
||||||
|
|
||||||
# Run tests, ARGS are passed-through to pytest
|
# Run tests, ARGS are passed-through to pytest
|
||||||
test *ARGS:
|
test *ARGS:
|
||||||
|
|
@ -41,7 +44,7 @@ alltests *ARGS:
|
||||||
|
|
||||||
# run tests and create coverage reports
|
# run tests and create coverage reports
|
||||||
coverage:
|
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 python, markdown, wheel file names, prek config
|
||||||
lint:
|
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
|
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)
|
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 commit -m "Release version $tag"
|
||||||
git tag "v$tag"
|
git tag "v$tag"
|
||||||
|
|
||||||
|
|
@ -65,7 +69,7 @@ release *release_name:
|
||||||
just build
|
just build
|
||||||
|
|
||||||
fj release create "v$tag: {{ release_name }}" --tag "v$tag" --attach dist/*.whl --body "$body"
|
fj release create "v$tag: {{ release_name }}" --tag "v$tag" --attach dist/*.whl --body "$body"
|
||||||
# just upload
|
just upload
|
||||||
mv {{ releasenotes }} {{ releasenotes }}.$tag
|
mv {{ releasenotes }} {{ releasenotes }}.$tag
|
||||||
|
|
||||||
# builds a package
|
# builds a package
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue