Bot releases are visible (Hide)
Published by mtkennerly over 2 years ago
--bump
CLI option and the bump
argument of Version.serialize
bumping even on a commit with a version tag. Now, no bumping occurs on such a commit.Published by mtkennerly over 2 years ago
Optional[...]
typing on arguments with a default of None
. (Contributed by jonathangreen)VERSION_SOURCE_PATTERN
public for consumption by other tools.Published by mtkennerly over 2 years ago
Added branch
and timestamp
to the Version
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:
[ \ ] ^ _ `
Published by mtkennerly over 2 years ago
Version.serialize
's format
argument to support passing a callback. (Contributed by marnikow)ignore
option to get_version()
. (Contributed by marnikow)parser
option to get_version()
.Version.parse()
. (Contributed by marnikow)Version.bump()
. (Contributed by marnikow)Published by mtkennerly over 2 years ago
importlib-metadata
for compatibility with Poetry.epoch
to Version
class, default tag pattern, and format placeholders.post
/dev
stages so that they are serialized and bumped correctly when using PEP 440.Published by mtkennerly almost 3 years ago
-
, .
, and _
).serialize_pep440()
to normalize the alternative prerelease names (alpha
-> a
, beta
-> b
, c
/pre
/preview
-> rc
) and capitalizations (RC
-> rc
, etc).py.typed
file for PEP-561. (Contributed by wwuck)pkg_resources
dependency with packaging
and importlib_metadata
. (Contributed by flying-sheep)__all__
.Published by mtkennerly about 3 years ago
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
and v1.2.3
). This is now relaxed so that v1
, 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 custom pattern
to the Version.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)
Published by mtkennerly over 3 years ago
Published by mtkennerly over 3 years ago
Published by mtkennerly almost 4 years ago
Published by mtkennerly almost 4 years ago
--decorate-refs
to maintain compatibility with older Git versions.Published by mtkennerly almost 4 years ago
Published by mtkennerly almost 4 years ago
--tagged-metadata
option and corresponding attribute on the Version
class. (Contributed by mariusvniekerk)pkg_resources
) for environments where it is not installed by default.Published by mtkennerly almost 4 years ago
--porcelain=v1
with --porcelain
to maintain compatibility with older Git versions.Published by mtkennerly almost 4 years ago
--bump
command line option and the bump
argument to Version.serialize()
.Published by mtkennerly about 4 years ago
Published by mtkennerly over 4 years ago
Previously, when there were not yet any version-like tags, the distance would be set to 0, so the only differentiator was the commit ID. Now, the distance will be set to the number of commits so far. For example:
Published by mtkennerly over 4 years ago
--debug
flag in the from
command.Published by mtkennerly over 4 years ago
serialize_pep440
serialize_semver
serialize_pvp
bump_version
Published by mtkennerly almost 5 years ago
Changed the Version
class to align with Dunamai's own semantics instead of PEP 440's semantics.
Previously, Version
implemented all of PEP 440's features, like epochs and dev releases, even though Dunamai itself did not use epochs (unless you created your own Version
instance with one and serialized it) and always set dev to 0 in the from_git
/etc methods. The serialize
method then tried to generalize those PEP 440 concepts to other versioning schemes, as in 0.1.0-epoch.1
for Semantic Versioning, even though that doesn't have an equivalent meaning in that scheme.
Now, the Version
class implements the semantics used by Dunamai, giving it more power in the serialization to map those concepts in an appropriate way for each scheme. For example, dev0
is now only added for PEP 440 (in order to be compatible with Pip's --pre
flag), but dev.0
is no longer added for Semantic Versioning because it served no purpose there.
API changes:
post
has been renamed to distance
, and its type is simply int
rather than Optional[int]
epoch
and dev
have been removedpre_type
has been renamed to stage
pre_number
has been renamed to revision
, and it is no longer required when specifying a stageImproved error reporting when the version control system cannot be detected and when a specified VCS is unavailable.
Improved the default regular expression for tags:
base
and stage
are separated by a hyphen.stage
and revision
are separated by a dot.stage
without a revision
.