Releases: mtkennerly/dunamai
v1.12.0 (2022-05-07)
- Added
Pattern
type for named pattern presets. Currently, this includes:Pattern.Default
(CLI:--pattern default
) for the existing default.Pattern.DefaultUnprefixed
(CLI:--pattern default-unprefixed
) for the existing default, but without requiring thev
prefix.
- Added
tag_branch
option (CLI:--tag-branch
) for Git repositories. This is particularly useful for Gitflow without fast forward, wheredevelop
does not contain the tag history, so you can specify--tag-branch master
. - Added
full_commit
option (CLI:--full-commit
) for Git and Mercurial repositories to obtain the full commit hash instead of the short form. - Fixed
Version.parse
so that it better handles versions without thev
prefix when the pattern does not (or may not) require it. - Fixed error reporting when a custom pattern is an invalid regular expression, as well as when a custom format is malformed.
It was fine when Dunamai was used as a library, but the error message lacked context on the CLI. - Fixed
from any
not passing the--tag-dir
option along for Subversion repositories.
v1.11.1 (2022-04-05)
- Fixed the
--bump
CLI option and thebump
argument ofVersion.serialize
bumping even on a commit with a version tag. Now, no bumping occurs on such a commit.
v1.11.0 (2022-03-15)
- Explicitly specified
Optional[...]
typing on arguments with a default ofNone
. (Contributed by jonathangreen) - Made
VERSION_SOURCE_PATTERN
public for consumption by other tools.
v1.10.0 (2022-03-08)
-
Added
branch
andtimestamp
to theVersion
class, along with associated format placeholders (branch
,branch_escaped
,timestamp
). Branch info is not populated for Darcs and Subversion repositories. -
Fixed validation for PEP 440, where the local segment was allowed to contain any characters.
-
Fixed validation for Semantic Versioning, where some segments were allowed to contain these additional characters:
[ \ ] ^ _ `
v1.9.0 (2022-02-20)
- Changed
Version.serialize
'sformat
argument to support passing a callback. (Contributed by marnikow) - Added
ignore
option toget_version()
. (Contributed by marnikow) - Added
parser
option toget_version()
. - Added
Version.parse()
. (Contributed by marnikow) - Added
Version.bump()
. (Contributed by marnikow)
v1.8.0 (2022-01-27)
- Changed the build backend to poetry-core. (Contributed by fabaff)
- Clarified serialization options that are ignored when using a custom format.
- Relaxed dependency range of
importlib-metadata
for compatibility with Poetry. - Added
epoch
toVersion
class, default tag pattern, and format placeholders. - Fixed PEP 440 validation to allow multiple digits in the epoch.
- Improved parsing of optional pattern groups so that we don't stop checking at the first one that's omitted.
- Fixed handling of tags with
post
/dev
stages so that they are serialized and bumped correctly when using PEP 440.
v1.7.0 (2021-10-31)
- Broadened the default version tag pattern to allow more separator styles recognized in PEP 440 pre-normalized forms (
-
,.
, and_
). - Enhanced
serialize_pep440()
to normalize the alternative prerelease names (alpha
->a
,beta
->b
,c
/pre
/preview
->rc
) and capitalizations (RC
->rc
, etc). - Added a
py.typed
file for PEP-561. (Contributed by wwuck) - Replaced
pkg_resources
dependency withpackaging
andimportlib_metadata
. (Contributed by flying-sheep) - Added some missing public items to
__all__
.
v1.6.0 (2021-08-09)
-
Fixed an oversight where the default version tag pattern would only find tags with exactly three parts in the base (e.g.,
v1.0.0
andv1.2.3
). This is now relaxed so thatv1
,v1.2.3.4
, and so on are also recognized.If you prefer the old default, you can pass a custom
--pattern
on the command line or a custompattern
to theVersion.from_*
methods. Specifically, the previous default used^v(?P<base>\d+\.\d+\.\d+)
instead of the new^v(?P<base>\d+(\.\d+)*)
, but the rest of the pattern is the same in both defaults. -
Added support for execution via
python -m dunamai
. (Contributed by jstriebel)
v1.5.5 (2021-04-26)
- Fixed handling of Git tags that contain slashes. (Contributed by ioben)
v1.5.4 (2021-01-20)
- Fixed handling of Git tags that contain commas.