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
Introducing release script #215
Conversation
|
|
||
| # Second commit: release version | ||
| sed -i "s/\.dev//g" setup.py | ||
| # Missing sed on pulpcore requirement on setup.py |
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 could not think of a good sed for this
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.
maybe something like
sed -i -e '/version=/s/\.dev//'
To only perform it once and on a line that contains "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.
Sorry, I did not describe well the problem, what I need to do is find a way to:
pulpcore>=3.3 into this pulpcore>=3.4,<3.5
|
|
||
| cd $BASEDIR/.. | ||
|
|
||
| towncrier --version $NEW_VERSION --draft |
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 wouldn't bother with this. Once we fully automate this and move it to a CI, we won't be able to run this step.
I think the release nanny will have to run this before triggering the release.
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 agree. Those changelog entries probably need to be revisited redactorially anyway.
|
The logic looks great. Very glad to see this. |
|
I remembered why I did not use pygithub, it was about credentials: |
82d806b
to
98e36cb
Compare
Executing the script for pulp_file:Output:pulp/pulp_file@master...fao89:release_1.0.0 Executing the script for pulpcore:Output: |
7bbfbf1
to
d1bc5d6
Compare
|
|
||
| # First commit: changelog | ||
| os.system(f"towncrier --yes --version {new_version}") | ||
| git.add(".") |
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.
Might just want to check in CHANGES.rst and anything in CHANGES/
| """ | ||
| Release script | ||
|
|
||
| $ python .travis/realease.py |
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.
nitpick - s/realease/release/
| if "pulpcore" in word: | ||
| pulpcore_word = word | ||
|
|
||
| line = line.replace( |
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.
Can we use bump2version to do this instead? https://pypi.org/project/bump2version/ Since that's software is made to do that I think it would be better.
That is also one of the recommended tools to help "single source" python versions https://packaging.python.org/guides/single-sourcing-package-version/ It would be cool if the plugin_template configured plugins with bump2version.
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'm reading the docs, but so far I could not understand how to deal with .dev using bump2version
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.
What about --new-version 0.1.2.dev ?
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 believe I understood how to do it, but I would need to open PR against all plugins first, I will do it on pulp_file as PoC
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.
draft PR on pulp_file:
pulp/pulp_file#390
python .travis/release.py major 4.0 4.1
Args:
release_part - major/minor/patch
current_pulpcore_version - lower bound of pulpcore requirement
next_pulpcore_version - upper bound of pulpcore requirement
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.
If this is up to date with the changes here pulp/pulpcore#714 then +1 to merging it. It looks like it is, so I'm lgtm-ing it.
b6c9276
to
dc39f55
Compare
which executes the first 6 steps of https://pulp.plan.io/projects/pulp/wiki/Pulp3_Release_Guide https://pulp.plan.io/issues/6600 closes #6600
which executes the first 6 steps of https://pulp.plan.io/projects/pulp/wiki/Pulp3_Release_Guide
https://pulp.plan.io/issues/6600
closes #6600
Executing the script for
pulp_file:Output:
pulp/pulp_file@master...fao89:release_1.0.0
Executing the script for
pulpcore:Output:
pulp/pulpcore@master...fao89:release_3.3.1