Versioning Models
H.Necessaire's models for semantic versioning and source control reference
H.Necessaire provides data models for semantic versioning and source control reference.
dotnet add package H.Necessaire
VersionNumber
Models the semantic versioning format: <MAJOR>.<MINOR>.<PATCH>
Supports and extended semantic version format that includes build number and/or a suffix: <MAJOR>.<MINOR>.<PATCH>.<BUILD><SUFFIX>
Knows how to Parse()
from string; knows how .ToString()
.
Knows how to compare versions: ==
, !=
, <
, >
, <=
, >=
.
class VersionNumber
{
int Major
int Minor
int? Patch
int? Build
string Suffix
}
Version
Models source control reference along with the semantic version number.
Knows how to Parse()
from string; knows how .ToString()
.
class Version
{
VersionNumber Number
DateTime Timestamp
string Branch
string Commit
}