bumpIncompatibleVersion

Increments a given version number to the next incompatible version.

Prerelease and build metadata information is removed.

This implements the "^" comparison operator, which represents "non-breaking SemVer compatibility." With 0.x.y releases, any release can break. With x.y.z releases, only major releases can break.

@safe pure
string
bumpIncompatibleVersion
(
string ver
)

Examples

assert(bumpIncompatibleVersion("0.0.0") == "0.0.1");
assert(bumpIncompatibleVersion("0.1.2") == "0.1.3");
assert(bumpIncompatibleVersion("1.0.0") == "2.0.0");
assert(bumpIncompatibleVersion("1.2.3") == "2.0.0");
assert(bumpIncompatibleVersion("1.2.3+metadata") == "2.0.0");
assert(bumpIncompatibleVersion("1.2.3-pre.release") == "2.0.0");
assert(bumpIncompatibleVersion("1.2.3-pre.release+metadata") == "2.0.0");

Meta