Table of Contents

Class ComposeGitPropertiesTask

Namespace
Steeltoe.Management.GitProperties.Build
Assembly
Steeltoe.Management.GitProperties.Build.dll

Merges the shared git.properties cache with the fields that can never be cached: the live repository dirty state, the per-project $(Version), and the build's own timestamp. Runs every build with no Inputs/Outputs skip: editing a tracked file doesn't touch any file timestamp this task could key incrementality off, and a cached build time would go stale the moment it's reused.

public sealed class ComposeGitPropertiesTask : Task, ITask
Inheritance
ComposeGitPropertiesTask
Implements
Inherited Members

Properties

CacheFile

Gets or sets the shared cache file to read from.

[Required]
public string CacheFile { get; set; }

Property Value

string

EnableWarnings

Gets or sets a value indicating whether a git executable failure is reported as a warning (true) or an informational message (false).

public bool EnableWarnings { get; set; }

Property Value

bool

FallbackFile

Gets or sets an optional additional path to copy the composed git.properties to. This is the durable fallback file used when a build has no usable git repository at all (e.g. a source-based cf push, where .git is excluded from the pushed tree).

public string? FallbackFile { get; set; }

Property Value

string

GitExecutable

Gets or sets the git executable to invoke.

[Required]
public string GitExecutable { get; set; }

Property Value

string

OutputFile

Gets or sets the per-project output file to write.

[Required]
public string OutputFile { get; set; }

Property Value

string

RepositoryRoot

Gets or sets the resolved git repository root directory.

[Required]
public string RepositoryRoot { get; set; }

Property Value

string

Version

Gets or sets the consuming project's $(Version), written as git.build.version.

public string? Version { get; set; }

Property Value

string

Methods

Execute()

Must be implemented by derived class.

public override bool Execute()

Returns

bool

true, if successful