LXSemVer
aims to provide a simple yet specification compliant implementation of Semantic Versioning 2.0.0 (SemVer) in Swift 4.x.
- Parsing version string into
Version
instances. -
DotSeparatedValues
(DSV) class to represent prerelease and/or build metadata. -
DotSeparatedValues
andVersion
instances supportnext()
, which provides a list of logical next DSVs and/or versions. -
DotSeparatedValues
andVersion
instances follows SemVer's precedence rule.
- Mac OS X 10.10+ / iOS 8.0+
- Xcode 9.0+
pod "LXSemVer", "~> 3.0"
github "trifia/LXSemVer" ~> 3.0
import LXSemVer
if let version = Version(string: "1.0.0") {
print(version)
}
import LXSemVer
let version: Version = "1.0.1-alpha.1"
print(version.next())
LXSemVer
3.0 uses Swift 4.
For projects using Swift 3, please use LXSemVer
2.0.
For projects using Swift 2.2 or older, please use LXSemVer
1.2.
LXSemVer
unique point is its concept of version graph. SemVer precedence rule (SemVer Specification 11) allow for logical digraph of versioning.
At any specific version, there are multiple logical paths leading to the next versions and these versions have logical ordering between them as well.
LXSemVer
extends on SemVer by recognizing alpha
, beta
and rc
as the first prerelease identifiers.
Together, they make LXSemVer
an excellent choice for versioning management.
LXSemVer
is released under the MIT license. See LICENSE for details.