dub.semver

Implements version validation and comparison according to the semantic versioning specification.

The general format of a semantic version is: a.b.c[-x.y...][+x.y...] a/b/c must be integer numbers with no leading zeros, and x/y/... must be either numbers or identifiers containing only ASCII alphabetic characters or hyphens. Identifiers may not start with a digit.

Members

Functions

bumpIncompatibleVersion
string bumpIncompatibleVersion(string ver)

Increments a given version number to the next incompatible version.

bumpVersion
string bumpVersion(string ver)

Increments a given (partial) version number to the next higher version.

compareVersions
int compareVersions(string a, string b)

Compares the precedence of two SemVer version strings.

expandVersion
string expandVersion(string ver)

Takes a partial version and expands it to a valid SemVer version.

isPreReleaseVersion
bool isPreReleaseVersion(string ver)

Determines if a given valid SemVer version has a pre-release suffix.

isValidVersion
bool isValidVersion(string ver)

Validates a version string according to the SemVer specification.

See Also

Meta

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.

Authors

Sönke Ludwig