Version

Represents a version in semantic version format, or a branch identifier.

This can either have the form "~master", where "master" is a branch name, or the form "major.update.bugfix-prerelease+buildmetadata" (see the Semantic Versioning Specification v2.0.0 at http://semver.org/).

Constructors

this
this(string vers)

Constructs a new Version from its string representation.

Members

Functions

opCmp
int opCmp(Version other)

Compares two versions/branches for precedence.

opEquals
bool opEquals(Version oth)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()

Returns the string representation of the version/branch.

Properties

isBranch
bool isBranch [@property getter]

Tests if this represents a branch instead of a version.

isMaster
bool isMaster [@property getter]

Tests if this represents the master branch "~master".

isPreRelease
bool isPreRelease [@property getter]

Tests if this represents a pre-release version.

isSCM
bool isSCM [@property getter]

Tests if this represents a hash instead of a version.

isUnknown
bool isUnknown [@property getter]

Tests if this represents the special unknown version constant.

Static functions

fromString
Version fromString(string vers)

Constructs a new Version from its string representation.

Static variables

masterBranch
Version masterBranch;
Undocumented in source.
maxRelease
Version maxRelease;
Undocumented in source.
minRelease
Version minRelease;
Undocumented in source.
unknown
Version unknown;
Undocumented in source.

Meta