GitVersionContext Class

Summary

Contextual information about where GitVersion is being run
Assembly
GitVersion.Core.dll
Namespace
GitVersion
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["GitVersionContext"] class Type type-node

Syntax

public class GitVersionContext

Attributes

Type Description
NullableContextAttribute
NullableAttribute

Constructors

Name Summary
GitVersionContext(IBranch, ICommit, IGitVersionConfiguration, bool, int) Contextual information about where GitVersion is being run

Properties

Name Value Summary
Configuration IGitVersionConfiguration
Contains the raw configuration, use Configuration for specific configuration based on the current GitVersion context.
CurrentBranch IBranch
Gets the branch currently being versioned.
CurrentBranchCommits IEnumerable<ICommit>
Gets commits authored before the current commit, or the full reachable history including the current tip when versioning a contextual branch at its tip.
CurrentCommit ICommit
Gets the commit being versioned.
IsCurrentCommitTagged bool
Gets a value indicating whether the current commit has an exact-match version tag.
NumberOfUncommittedChanges int
Gets the number of files that have been modified but not yet committed.

Extension Methods

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