Skip to content

Commit 1f3a93d

Browse files
committed
add release recipe to justfile
1 parent 2c11d31 commit 1f3a93d

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

docs/devs/maintainers.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ Please make sure to always provide a patch version number (i.e. use a version
1010
number with *three* levels such as `1.0.0` instead of `1.0`).
1111

1212
```sh title="shell"
13-
# edit version number in pyproject.toml
14-
git add pyproject.toml
15-
git commit -m "release vX.Y.Z"
16-
git tag -a vX.Y.Z
17-
git push --follow-tags
13+
just release X.Y.Z
1814
```
1915

20-
Releasing on PyPI is then performed automatically by a GitHub action workflow.
16+
This will update the version number to `X.Y.Z` and create an annotated tag for
17+
you. Once you've written the release notes, check the created commit. If
18+
satisfactory, `git push --follow-tags` will trigger publication on PyPI via a
19+
GitHub Action.

justfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,13 @@ test:
2525
# invoke mkdocs with appropriate dependencies
2626
mkdocs *FLAGS:
2727
uv run --with-requirements=docs/requirements.txt -- mkdocs {{FLAGS}}
28+
29+
release version:
30+
@if [ -n "$(git status --porcelain || echo "dirty")" ]; then echo "repo is dirty!"; exit 1; fi
31+
sed -i 's/^version = ".*"$/version = "{{ version }}"/g' pyproject.toml
32+
git add pyproject.toml
33+
sed -i 's/"stagpy~=.*"/"stagpy~={{ version }}"/g' docs/user-guide/install.md
34+
git add docs/user-guide/install.md
35+
git commit -m "release {{ version }}"
36+
git tag -m "Release {{ version }}" -a -e "v{{ version }}"
37+
@echo "check last commit and ammend as necessary, then git push --follow-tags"

0 commit comments

Comments
 (0)