Summary
Gets RWX git information for the current build.
- Namespace
- Cake
.Common .Build .Rwx .Data - Containing Type
- RwxEnvironmentInfo
Syntax
public RwxGitInfo Git { get; }
Examples
if (BuildSystem.Rwx.IsRunningOnRwx)
{
Information(
@"Git:
RepositoryUrl: {0}
CommitSha: {1}
RefName: {2}",
BuildSystem.Rwx.Environment.Git.RepositoryUrl,
BuildSystem.Rwx.Environment.Git.CommitSha,
BuildSystem.Rwx.Environment.Git.RefName
);
}
else
{
Information("Not running on RWX");
}
if (Rwx.IsRunningOnRwx)
{
Information(
@"Git:
RepositoryUrl: {0}
CommitSha: {1}
RefName: {2}",
Rwx.Environment.Git.RepositoryUrl,
Rwx.Environment.Git.CommitSha,
Rwx.Environment.Git.RefName
);
}
else
{
Information("Not running on RWX");
}
Value
| Type | Description |
|---|---|
| RwxGitInfo |
The git information. Populated by the RWX git/clone package, so it is only
available to tasks that depend (directly or transitively) on a task that ran
git/clone; otherwise the properties return empty strings.
|
