-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Use tbump over bump2version (#1790)
* Add tbump to 'develop' extra and remove bump2version. * Add tbump.toml to configure tbump. - Allow for valid versions to follow SemVer and also support release candidates: <major>.<minor>.<patch>rc<candidate> - Guard pyhf.utils.SCHEMA_VERSION against version bumps accidentally bumping the SCHEMA_VERSION.
- Loading branch information
1 parent
9fd99be
commit a8982e4
Showing
2 changed files
with
62 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
github_url = "https://github.com/scikit-hep/pyhf/" | ||
|
||
[version] | ||
current = "0.6.3" | ||
|
||
# Example of a semver regexp. | ||
# Make sure this matches current_version before | ||
# using tbump | ||
regex = ''' | ||
(?P<major>\d+) | ||
\. | ||
(?P<minor>\d+) | ||
\. | ||
(?P<patch>\d+) | ||
(rc | ||
(?P<candidate>\d+) | ||
)? | ||
''' | ||
|
||
[git] | ||
# The current version will get updated when tbump is run | ||
message_template = "Bump version: 0.6.3 → {new_version}" | ||
tag_template = "v{new_version}" | ||
|
||
# For each file to patch, add a [[file]] config | ||
# section containing the path of the file, relative to the | ||
# tbump.toml location. | ||
[[file]] | ||
src = "tbump.toml" | ||
# Restrict search to make it explicit why tbump.toml | ||
# is even included as a file to bump, as it will get | ||
# its version.current attribute bumped anyway. | ||
search = "Bump version: {current_version} → " | ||
|
||
[[file]] | ||
src = "src/pyhf/utils.py" | ||
# Guard SCHEMA_VERSION | ||
# This search is just identifying the line to restrict the | ||
# regex to, but all matches in the line will get bumped. | ||
search = "pyhf: v{current_version}" | ||
|
||
[[file]] | ||
src = "README.rst" | ||
|
||
[[file]] | ||
src = "src/pyhf/data/citation.bib" | ||
|
||
[[file]] | ||
src = ".zenodo.json" | ||
|
||
[[file]] | ||
src = "codemeta.json" | ||
|
||
[[file]] | ||
src = "CITATION.cff" | ||
|
||
[[field]] | ||
# the name of the field | ||
name = "candidate" | ||
# the default value to use, if there is no match | ||
default = "" |