Table of Contents

Class GitVersionCommand

Namespace
DotNetDo
Assembly
DotNetDo.Core.dll

Calculates version variables using the manifest-owned GitVersion.Tool package.

public sealed record GitVersionCommand : PackageToolCommand<GitVersionResult>, IEquatable<ExecOptions>, IEquatable<ToolCommand>, IEquatable<ToolCommand<GitVersionResult>>, IEquatable<PackageToolCommand<GitVersionResult>>, IEquatable<GitVersionCommand>

Inheritance

Implements

Constructors

GitVersionCommand()

Creates the default GitVersion invocation with JSON output and round-trip commit dates.

public GitVersionCommand()

Properties

AllowShallow

Whether shallow repositories are accepted.

public bool AllowShallow { get; init; }

Property Value

bool

Branch

The remote branch name.

public string? Branch { get; init; }

Property Value

string?

CommandParts

The package-tool prefix plus positional target and credential arguments.

protected override IReadOnlyList<string?> CommandParts { get; }

Property Value

IReadOnlyList<string?>

Commit

The remote commit to inspect.

public string? Commit { get; init; }

Property Value

string?

Config

The GitVersion configuration file.

public AbsolutePath? Config { get; init; }

Property Value

AbsolutePath?

Diagnostic

Whether diagnostic processing is enabled.

public bool Diagnostic { get; init; }

Property Value

bool

DynamicRepositoryLocation

The directory used for a dynamically cloned remote repository.

public AbsolutePath? DynamicRepositoryLocation { get; init; }

Property Value

AbsolutePath?

LogFile

The diagnostic log output file.

public AbsolutePath? LogFile { get; init; }

Property Value

AbsolutePath?

NoCache

Whether GitVersion's cache is disabled.

public bool NoCache { get; init; }

Property Value

bool

NoFetch

Whether remote fetching is disabled.

public bool NoFetch { get; init; }

Property Value

bool

NoNormalize

Whether build-server repository normalization is disabled.

public bool NoNormalize { get; init; }

Property Value

bool

OverrideConfig

GitVersion configuration overrides; commit-date-format is reserved by the result contract.

public IReadOnlyDictionary<string, string> OverrideConfig { get; init; }

Property Value

IReadOnlyDictionary<string, string>

Password

The redacted remote repository password.

public Secret? Password { get; init; }

Property Value

Secret?

TargetPath

The repository to inspect; the execution directory is used when omitted.

public AbsolutePath? TargetPath { get; init; }

Property Value

AbsolutePath?

Url

The remote repository URL.

public string? Url { get; init; }

Property Value

string?

Username

The remote repository username.

public string? Username { get; init; }

Property Value

string?

Methods

ReadResult(ExecResult)

Converts a successful raw process result to the command's semantic result.

protected override GitVersionResult ReadResult(ExecResult result)

Parameters

result ExecResult

Returns

GitVersionResult