Table of Contents

Class GitOutputs

Namespace
NoeticTools.Git2SemVer.Framework
Assembly
NoeticTools.Git2SemVer.Framework.dll

Git output properties for JSON serialisation.

public sealed class GitOutputs : IGitOutputs
Inheritance
GitOutputs
Implements
Inherited Members

Properties

BranchName

The local Git repository head's last commit SHA.

public 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.

public 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.

public 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.

public 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.

public ICommit? LastReleaseCommit { get; }

Property Value

ICommit

LastReleaseVersion

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

public SemVersion? LastReleaseVersion { get; }

Property Value

SemVersion