GitAliases.

GitDescribe(ICakeContext, DirectoryPath, string, bool, GitDescribeStrategy, Nullable<int>) Method

Summary

Describe specified commit-ish.
Assembly
Cake.Git.dll
Namespace
Cake.Git
Containing Type
GitAliases

Syntax

public static string GitDescribe(this ICakeContext context, DirectoryPath repositoryDirectoryPath, string commitishName, bool renderLongFormat, GitDescribeStrategy strategy, Nullable<int> minimumCommitIdAbbreviatedSize)

Examples

var result = GitDescribe(".", "master", false, GitDescribeStrategy.Tags, 0);

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute

Parameters

Name Type Description
context ICakeContext The context.
repositoryDirectoryPath DirectoryPath Path to repository.
commitishName string Commit-ish name.
renderLongFormat bool Always output the long format (the tag, the number of commits and the abbreviated commit name) even when it matches a tag. This is useful when you want to see parts of the commit object name in "describe" output, even when the commit in question happens to be a tagged version. Instead of just emitting the tag name, it will describe such a commit as v1.2-0-gdeadbee (0th commit since tag v1.2 that points at object deadbee...).
strategy GitDescribeStrategy Describe strategy.
minimumCommitIdAbbreviatedSize Nullable<int> Number of minimum hexadecimal digits used to render a uniquely abbreviated commit id.

Return Value

Type Description
string Described commit using the most recent tag reachable from it.