Skip to content
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

Cleanup .bumpversion.cfg #926

Merged
merged 1 commit into from
Nov 19, 2024
Merged

Cleanup .bumpversion.cfg #926

merged 1 commit into from
Nov 19, 2024

Conversation

mdellweg
Copy link
Member

This config file is deprecated. To support older branches, we consult it as a fallback only.

@mdellweg mdellweg force-pushed the bump_version_cfg branch 2 times, most recently from eb1ab55 to 56364d2 Compare November 18, 2024 12:26
@mdellweg mdellweg marked this pull request as ready for review November 18, 2024 13:49
This config file is deprecated. To support older branches, we consult
it as a fallback only.
Copy link
Member

@pedro-psb pedro-psb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are there implementation of current version?

repo["name"]
for repo in itertools.chain(*repolist["repos"].values())
if "subpackage_of" not in repo
]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's better 😅
What I want to change in the format is to have the repo_type and subpackages childs of repo, so repos would only have repo entries.

current_version = repo.git.grep(
"current_version", DEFAULT_BRANCH, "--", ".bumpversion.cfg"
).split("=")[-1]
return Version(current_version)
Copy link
Member

@pedro-psb pedro-psb Nov 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implementation looks better than the one in utils.py (e.g the use of split+Version). I see this one is inside the template, so they are probably not reusable, but any reason they are not the same?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, they don't run in the same context. This one reads the version from git without checking the default branch out. And it creates a Version object.
The other one reads the version from an actual file of the current branch while being in the plugin_template directory and we really only want the version string.

@mdellweg mdellweg merged commit c4460b7 into pulp:main Nov 19, 2024
11 checks passed
@mdellweg mdellweg deleted the bump_version_cfg branch November 19, 2024 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants