-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New feature: retrieve and update the PEP 621 project version, if poss…
…ible When determining the current version, and if `tool.bumpversion.current_version` is not set, attempt to retrieve the version from `project.version` à la PEP 621. If that setting is not set, or if the version is explicitly marked as dynamically set, then continue with querying SCM tags. When updating the configuration during bumping, if we previously successfully retrieved a PEP 621 version, then update the `project.version` field in `pyproject.toml` as well. We always update, even if the true current version was read from `tool.bumpversion.current_version` instead of `project.version`. The docs have been updated; specifically, the "multiple replacements in one file" howto and the reference for `current_version`. The tests have been adapted: the new `pep621_info` property would otherwise trip up the old test output, and the `None` default would trip up the TOML serializer. Additionally, new tests assert that `project.version` (and correspondingly, the `pep621_info` property) is correctly honored or ignored, depending on the other circumstances.
- Loading branch information
1 parent
ccebdb6
commit 3032450
Showing
13 changed files
with
365 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,6 +108,8 @@ parts: | |
values: | ||
- "dev" | ||
- "gamma" | ||
pep621_info: | ||
version: null | ||
post_commit_hooks: | ||
|
||
pre_commit_hooks: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.