Add a release helper to x.py#11
Conversation
|
Dear User, |
blazraST
left a comment
There was a problem hiding this comment.
Why do we depend on the dotnet GitVersion tool and uv?
|
|
||
| replace_line("../compost_rpc/compost_rpc.py", r'^__version__\s*=.*$', f'__version__ = "{new_version}"') | ||
|
|
||
| run(["git", "-C", "..", "add", "compost_rpc/compost_rpc.py", "pyproject.toml"]) |
There was a problem hiding this comment.
This is weird on multiple levels - you use -C and give a relative path and then the path is ... Why?
There was a problem hiding this comment.
It is weird because the script sets the test folder globally as a root. If we extend this script to do more than just tests, it should be changed. Didn't do it yet though, hence this.
There was a problem hiding this comment.
We should change it then, but even if we didn't I don't see the reason to do this.
| replace_line("../compost_rpc/compost_rpc.py", r'^__version__\s*=.*$', f'__version__ = "{new_version}"') | ||
|
|
||
| run(["git", "-C", "..", "add", "compost_rpc/compost_rpc.py", "pyproject.toml"]) | ||
| run(["git", "-C", "..", "commit", "-m", f"chore: Release version {new_version}"]) |
There was a problem hiding this comment.
I don't like the "chore: " prefix
There was a problem hiding this comment.
It can be removed.
Right now we depend on both anyways, |
This should help with ensuring that release commits are consistent and easy to do. It also makes it possible for x.py targets to accept arguments in the future.