just: congregate releated recipes; reuse recipes in "release"
This commit is contained in:
parent
84f488f06a
commit
dd42e6119c
1 changed files with 20 additions and 29 deletions
49
justfile
49
justfile
|
|
@ -9,14 +9,6 @@ default:
|
|||
setup:
|
||||
uv sync
|
||||
|
||||
# builds a package
|
||||
build:
|
||||
uv build --wheel --clear
|
||||
|
||||
# upload to Package Registry
|
||||
upload: build
|
||||
uv run twine upload --repository code.cbo --config-file ~/.config/pypirc dist/*.whl
|
||||
|
||||
# console to observe log messages
|
||||
console:
|
||||
uv run textual console
|
||||
|
|
@ -29,16 +21,16 @@ run-console:
|
|||
run:
|
||||
uv run python -m {{ the_app }}
|
||||
|
||||
# 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
|
||||
|
||||
# Update dependencies to new versions
|
||||
update-deps:
|
||||
uv lock --upgrade
|
||||
uv sync
|
||||
|
||||
# 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
|
||||
|
||||
# Run tests, ARGS are passed-through to pytest
|
||||
test *ARGS:
|
||||
uv run pytest tests.py -m "not final" {{ ARGS }}
|
||||
|
|
@ -50,27 +42,18 @@ alltests *ARGS:
|
|||
coverage:
|
||||
uv run pytest tests.py --cov=src/ --cov-report term --cov-report xml --cov-report html --cov-config pyproject.toml
|
||||
|
||||
# run python and markdown
|
||||
# lint python, markdown, wheel file names, prek config
|
||||
lint:
|
||||
uv run ruff check .
|
||||
markdownlint-cli2 .
|
||||
uv run twine check --strict dist/*
|
||||
prek validate-config prek.toml
|
||||
|
||||
# pretend we are CI
|
||||
ci: lint
|
||||
prek run --all-files
|
||||
# woodpecker-cli exec "whatever"
|
||||
|
||||
[private]
|
||||
bump segment:
|
||||
uv version --bump {{ segment }}
|
||||
|
||||
[private]
|
||||
release segment *release_name:
|
||||
release *release_name:
|
||||
#!/usr/bin/env fish
|
||||
test -f releasenotes.md; and set -l body "$(cat releasenotes.md)"; or set -l body ""
|
||||
set -l tag (uv version --short --output-format text --bump {{ segment }})
|
||||
set -l release_name {{ release_name }}
|
||||
test -f releasenotes.md; and set -l body "$(cat releasenotes.md)"; or set -l body ""
|
||||
set -l tag (uv version --short --output-format text)
|
||||
|
||||
git add pyproject.toml uv.lock
|
||||
git commit -m "Release version $tag"
|
||||
|
|
@ -79,7 +62,15 @@ release segment *release_name:
|
|||
git push
|
||||
git push origin tag "v$tag"
|
||||
|
||||
just build
|
||||
|
||||
fj release create "v$tag: $release_name" --tag "v$tag" --attach dist/*.whl --body "$body"
|
||||
# just upload
|
||||
|
||||
# builds a package
|
||||
build:
|
||||
uv build --wheel --clear
|
||||
|
||||
fj release create "v$tag: $release_name" --prerelease --tag "v$tag" --attach dist/*.whl --body "$body"
|
||||
# uv run twine upload --config-file ~/.config/pypirc --repository code.cbo dist/*.whl
|
||||
# upload to Package Registry
|
||||
upload:
|
||||
uv run twine upload --repository code.cbo --config-file ~/.config/pypirc dist/*.whl
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue