discord-modmail / modmail

A Modmail bot for Discord. Allowing safe moderator conversations with server members one server at a time.
https://discord-modmail.readthedocs.io/
MIT License
15 stars 8 forks source link

feat: Automatic bumping of version with poetry #42

Open onerandomusername opened 3 years ago

onerandomusername commented 3 years ago

Is there an existing issue for this?

What is the feature?

Configure a workflow or precommit check or something.

Some way to ensure that with all pull request merges, we follow semantic versioning.

Would you like to implement this yourself?

Yes, I'd like to implement this

Shivansh-007 commented 3 years ago

Tiangolo, the author of the lovely framework FastAPI has done one more lovely thing for your lovely issue.

He introduced a poetry plugin a while ago, which does exactly what you wish to have. It can read the version from an __init__.py file:

# __init__.py

__version__ = "0.1.0"

or from a git tag, set with a GitHub release or with:

$ git tag 0.1.0
onerandomusername commented 3 years ago

That isn't exactly what I'm looking for. That looks for a __version__ variable in the package and uses that for the package version, rather than what is in the pyproject.toml file. Meanwhile, poetry version will bump the version in the pyproject.toml file,