Table of Contents

Interface IGitOutputs

Namespace
NoeticTools.Git2SemVer.Framework
Assembly
NoeticTools.Git2SemVer.Framework.dll
[JsonDerivedType(typeof(GitOutputs), "GitOutputs")]
public interface IGitOutputs

Properties

BranchName

The local Git repository head's last commit SHA.

string BranchName { get; }

Property Value

string

Remarks

Not output from the MSBuild task. Following tasks should use the MSBuild property RepositoryBranch

CommitsSinceLastRelease

The commit count (height) from the last release's commit to the head's last commit.

int CommitsSinceLastRelease { get; }

Property Value

int

Remarks

Not used by Git2SemVer. Provided for C# script use.

Using commit height is a popular practice in leu of a build number. It is not always unique, does not increment on each build, and may not be reproducible. Consider using the build host's BuildNumber instead.

HasLocalChanges

True if there are local changes since the last commit.

bool HasLocalChanges { get; }

Property Value

bool

Remarks

Not used by Git2SemVer. Provided for C# script use.

HeadCommit

The local Git repository head's last commit SHA.

ICommit HeadCommit { get; }

Property Value

ICommit

Remarks

Not output from the Git2SemVer MSBuild task. Following MSBuild tasks should use the MSBuild property RepositoryCommit

LastReleaseCommit

The last release's commit. Null if no prior release found.

ICommit? LastReleaseCommit { get; }

Property Value

ICommit

LastReleaseVersion

The last release's version. Null if no prior release.

SemVersion? LastReleaseVersion { get; }

Property Value

SemVersion