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
Branch
The remote branch name.
public string? Branch { get; init; }Property Value
CommandParts
The package-tool prefix plus positional target and credential arguments.
protected override IReadOnlyList<string?> CommandParts { get; }Property Value
Commit
The remote commit to inspect.
public string? Commit { get; init; }Property Value
Config
The GitVersion configuration file.
public AbsolutePath? Config { get; init; }Property Value
Diagnostic
Whether diagnostic processing is enabled.
public bool Diagnostic { get; init; }Property Value
DynamicRepositoryLocation
The directory used for a dynamically cloned remote repository.
public AbsolutePath? DynamicRepositoryLocation { get; init; }Property Value
LogFile
The diagnostic log output file.
public AbsolutePath? LogFile { get; init; }Property Value
NoCache
Whether GitVersion's cache is disabled.
public bool NoCache { get; init; }Property Value
NoFetch
Whether remote fetching is disabled.
public bool NoFetch { get; init; }Property Value
NoNormalize
Whether build-server repository normalization is disabled.
public bool NoNormalize { get; init; }Property Value
OverrideConfig
GitVersion configuration overrides; commit-date-format is reserved by the result contract.
public IReadOnlyDictionary<string, string> OverrideConfig { get; init; }Property Value
Password
The redacted remote repository password.
public Secret? Password { get; init; }Property Value
TargetPath
The repository to inspect; the execution directory is used when omitted.
public AbsolutePath? TargetPath { get; init; }Property Value
Url
The remote repository URL.
public string? Url { get; init; }Property Value
Username
The remote repository username.
public string? Username { get; init; }Property Value
Methods
ReadResult(ExecResult)
Converts a successful raw process result to the command's semantic result.
protected override GitVersionResult ReadResult(ExecResult result)Parameters
resultExecResult