SemanticVersionFormatValues Class

Summary

Exposes all computed version format values used by custom format strings in GitVersion configuration.
Assembly
GitVersion.Core.dll
Namespace
GitVersion
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["SemanticVersionFormatValues"] class Type type-node

Syntax

public class SemanticVersionFormatValues

Attributes

Type Description
NullableContextAttribute
NullableAttribute

Constructors

Name Summary
SemanticVersionFormatValues(SemanticVersion, IGitVersionConfiguration, int) Exposes all computed version format values used by custom format strings in GitVersion configuration.

Properties

Name Value Summary
AssemblyFileSemVer string
Gets the assembly file version string computed according to the configured AssemblyFileVersioningScheme.
AssemblySemVer string
Gets the assembly version string computed according to the configured AssemblyVersioningScheme.
BranchName string
Gets the name of the branch on which this version was calculated.
BuildMetaData string
Gets the build metadata string (commits-since-tag).
CommitCountSourceDistance string
Gets the count of non-ignored commits beyond the counting anchor.
CommitCountSourceSha string
Gets the nullable counting anchor SHA.
CommitDate string
Gets the commit date formatted according to the configured CommitDateFormat.
EscapedBranchName string
Gets the branch name with characters that are invalid in environment variable names replaced by dashes.
FullBuildMetaData string
Gets the full build metadata string including branch, SHA, and other fields.
FullSemVer string
Gets the full semantic version string including build metadata.
InformationalVersion string
Gets the informational version string (SemVer + full build metadata).
Major string
Gets the major version component as a string.
MajorMinorPatch string
Gets the version in Major.Minor.Patch format.
Minor string
Gets the minor version component as a string.
Patch string
Gets the patch version component as a string.
PreReleaseLabel string
Gets the full pre-release label (e.g. beta.1).
PreReleaseLabelName string
Gets the pre-release label name without the numeric identifier (e.g. beta).
PreReleaseLabelNameWithDash string
Gets the pre-release label name prefixed with a dash (e.g. -beta), or empty string when there is no label name.
PreReleaseLabelWithDash string
Gets the pre-release label prefixed with a dash (e.g. -beta.1), or empty string when there is no label.
PreReleaseNumber string
Gets the numeric pre-release identifier as a string, or empty string when absent.
SemVer string
Gets the default semantic version string (without build metadata).
SemVerSourceIncrement string
Gets the final increment relative to the semantic baseline.
SemVerSourceSemVer string
Gets the semantic baseline supplied by the selected artifact or derivation.
SemVerSourceSha string
Gets the semantic source SHA, or null for external sources.
Sha string
Gets the full SHA of the current commit.
ShortSha string
Gets the abbreviated SHA of the current commit.
UncommittedChanges string
Gets the number of uncommitted changes in the working tree.
VersionSourceDistance string
Gets the number of commits between the version source tag and the current commit.
VersionSourceIncrement string
Gets the version field that was incremented relative to the version source.
VersionSourceSemVer string
Gets the legacy semantic baseline, which may not correspond to VersionSourceSha.
VersionSourceSha string
Gets the SHA of the source tag commit.
WeightedPreReleaseNumber string
Gets the pre-release number adjusted by the configured pre-release weight.

Extension Methods

Name Value Summary
NotNull<SemanticVersionFormatValues>(string) T
Throws System.ArgumentNullException when value is null; otherwise returns the value.