dub.semver

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

Members

Functions

bumpVersion
string bumpVersion(string ver)

Given version string, increments the next to last version number. Prerelease and build metadata information is ignored. @param ver Does not need to be a valid semver version. @return Valid semver version

compareVersions
int compareVersions(string a, string b)

Compares the precedence of two SemVer version strings.

expandVersion
string expandVersion(string ver)

Takes a abbreviated version and expands it to a valid SemVer version. E.g. "1.0" -> "1.0.0"

isValidVersion
bool isValidVersion(string ver)

Validates a version string according to the SemVer specification.

Meta

Authors

Sönke Ludwig

License

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