-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let poetry automatically pull version from tags #448
base: master
Are you sure you want to change the base?
Conversation
@@ -1,7 +1,8 @@ | |||
#!/usr/bin/env python | |||
|
|||
|
|||
SUZIEQ_VERSION = "0.15.1" | |||
__version__ = "0.0.0" | |||
SUZIEQ_VERSION = __version__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kept SUZIEQ_VERSION since I did not know if this module is being imported in other modules.
05d8fcc
to
6852818
Compare
@zxiiro Thank you for all the contributions. I was in the middle of a release and so didn't start to work on your new PRs. Will do so once the release is out, which should be early today |
No worries. I'm just doing this for fun. Let me know if there's anything you need me to change in my PRs :) |
d6c143b
to
fcff97f
Compare
@zxiiro I'm going to leave this open for a bit. I need to get a bit more organized before I go down this path. But when I'm ready, I want to use this. So, please don't close the PR |
Sounds good. I'll periodically keep it up to date so that when you're ready for it the PR is ready to go. |
Thats very kind of you Thanh, thank you. |
Rather than spending time updating the 2 files that have hardcoded versions in them. Let poetry auto-generate the versions directly from Git tags. If a dev has a git tag checked out then `poetry build` will generate a version directly from that tag, for example the tag "v0.15.1" will produce a version "0.15.1". Otherwise the version will be based on how many commits since the last tag was available in Git history for example "0.15.1-post.13+d211ed4347" where "post.13" represents 13 commits since v0.15.1 was tagged and "d211ed4347" is the commit hash of the commit that generated this version. For this to work however devs are required to install poetry-dynamic-versioning in addition to poetry at the global level. Ref: https://pypi.org/project/poetry-dynamic-versioning/ Signed-off-by: Thanh Ha <[email protected]>
Rather than spending time updating the 2 files that have hardcoded
versions in them. Let poetry auto-generate the versions directly from
Git tags.
If a dev has a git tag checked out then
poetry build
will generatea version directly from that tag, for example the tag "v0.15.1" will
produce a version "0.15.1".
Otherwise the version will be based on how many commits since the last
tag was available in Git history for example "0.15.1-post.13+d211ed4347"
where "post.13" represents 13 commits since v0.15.1 was tagged and
"d211ed4347" is the commit hash of the commit that generated this
version.
For this to work however devs are required to install
poetry-dynamic-versioning in addition to poetry at the global level.
Ref: https://pypi.org/project/poetry-dynamic-versioning/
Signed-off-by: Thanh Ha [email protected]