-
Notifications
You must be signed in to change notification settings - Fork 49
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
ci: add current git sha to version in build-wheel job #856
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
Hmm, you are right, we had something like I think I like the I we can keep |
If the version is the only thing in ini.py, I will adapt the replace the current version with the suffixed version. Then rc, dev, etc, is not going to be a problem. I can remove the middle part Let's hear from @MyPyDavid about the PR number. I will adapt this PR, as soon as all agree. |
This comment was marked as resolved.
This comment was marked as resolved.
1ef270c
to
1842bf2
Compare
Think that the commit |
You mean using the |
This comment was marked as resolved.
This comment was marked as resolved.
just |
This comment was marked as resolved.
This comment was marked as resolved.
675a487
to
4465666
Compare
All done, please check. The wheel is built, the metadata is checked and then I install rdmo (without dev etc) from this wheel. If all works without error, the wheel is uploaded is an artifact. Should be safe to use in a deployment. I added a summary message for the build-wheel step. It will show the output of "pip show rdmo", which includes the "new" version (including SHA). |
987b5a6
to
bc88b9a
Compare
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.
super, thank you!
Description
This PR proposes the following changes:
VERSION
variable from init.pyMotivation and Context
As discussed in the slack channel yesterday, this was desired by @jochenklar.
Originally the build-wheel job was introduced in #812.
It created a python wheel (including the JavaScript frontend code bundled with webpack) under the name
rdmo-{version}dev{pr_number}-py3-none-any.whl
e.g. given
version = 2.0.2 and pr_number = 833
rdmo-2.0.2dev833-py3-none-any.whl
@jochenklar suggested the new wheel name to include the git SHA (7 chars short version) to ease deploying multiple times from the same PR (possibly long living like the dev2.1.0).
However the suggested form of
rdmo-{version}.dev{sha}-py3-none-any.whl
is invalid, due to PEP440 and Version specifiers.
dev
can only be followed by an integer, which the PR number was.I chose this new pattern instead:
rdmo-{version}.dev0+{sha}-py3-none-any.whl
which is valid. Another possibility would be:
rdmo-{version}+{sha}-py3-none-any.whl
What do you think?
How has this been tested?
Tested locally.
$ python -m pip install rdmo-2.0.2.dev0+553c22a-py3-none-any.whl
Types of Changes
Checklist
Tasks