-
Notifications
You must be signed in to change notification settings - Fork 35
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
Conversation
eb1ab55
to
56364d2
Compare
56364d2
to
c863cf4
Compare
This config file is deprecated. To support older branches, we consult it as a fallback only.
c863cf4
to
e386a8f
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.
Why are there implementation of current
version?
repo["name"] | ||
for repo in itertools.chain(*repolist["repos"].values()) | ||
if "subpackage_of" not in repo | ||
] |
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.
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) |
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.
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?
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.
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.
This config file is deprecated. To support older branches, we consult it as a fallback only.