Summary
Holds the build metadata attached to a semantic version
(commits-since-tag, branch, SHA, commit date, etc.).
- Namespace
- GitVersion
- Interfaces
-
-
IEquatable
<Semantic Version Build Meta Data>
-
IEquatable
- Base Types
-
- IFormattable
graph BT Type-->Base0["IFormattable"]
Type-.->Interface0["IEquatable<SemanticVersionBuildMetaData>"]
Type["SemanticVersionBuildMetaData"] class Type type-node
Syntax
public sealed class SemanticVersionBuildMetaData : IFormattable,
IEquatable<SemanticVersionBuildMetaData>
Constructors
| Name | Summary |
|---|---|
|
Semantic |
Initializes a new empty build metadata instance. |
|
Semantic |
Initializes a new build metadata instance with all fields specified. |
|
Semantic |
Initializes a new build metadata instance as a copy of buildMetaData. |
Fields
| Name | Constant Value | Summary |
|---|---|---|
| Empty |
An empty build metadata instance with no fields set.
static
|
Properties
| Name | Value | Summary |
|---|---|---|
| Branch | string |
Gets or initializes the name of the branch on which this
version was calculated.
|
| CommitDate | DateTimeOffset? |
Gets or initializes the date of the current commit.
|
| CommitsSinceTag | long? |
Gets or initializes the number of commits since the last
version tag.
|
|
Commits |
long |
Gets the number of commits since the version source
(alias for
VersionSourceDistance).
|
| OtherMetaData | string |
Gets or initializes any additional free-form metadata
included in the build metadata string.
|
| Sha | string |
Gets or initializes the full SHA of the current commit.
|
| ShortSha | string |
Gets or initializes the abbreviated SHA of the current
commit.
|
| UncommittedChanges | long |
Gets or initializes the number of uncommitted changes in
the working tree.
|
|
Version |
long |
Gets or initializes the number of commits between the
version source tag and the current commit.
|
|
Version |
VersionField |
Gets or initializes the version field that was
incremented relative to the version source.
|
| VersionSourceSemVer | SemanticVersion |
Gets or initializes the semantic version of the source
tag from which the version was calculated.
|
| VersionSourceSha | string |
Gets or initializes the SHA of the source tag commit.
|
Methods
| Name | Value | Summary |
|---|---|---|
|
Equals |
bool | |
|
Equals |
bool |
Returns
true when this instance
is equal to
other by
commit count, branch, and SHA.
|
|
GetHashCode |
int |
Returns a hash code based on commit count, branch, and
SHA.
|
|
Parse |
Semantic |
Parses the build metadata string, returning
Empty
when the input is null or empty.
static
|
|
ToString |
string |
Returns the default build metadata string
(commits-since-tag).
|
|
ToString |
string |
b - Formats just the build number s - Formats the build number and the Git Sha f - Formats the full build metadata |
|
ToString |
string |
Returns a string representation of this build metadata
using the given format specifier.
|
Operators
| Name | Value | Summary |
|---|---|---|
|
implicit operator
|
Semantic |
|
|
implicit operator string |
string | |
|
operator != |
bool | |
|
operator == |
bool |
Extension Methods
| Name | Value | Summary |
|---|---|---|
|
NotNull |
T |
Throws
ArgumentNullException when
value is
null; otherwise returns the
value.
From
CommonExtensions
|