GitAliases.

GitDescribe(ICakeContext, DirectoryPath, bool, GitDescribeStrategy, int?) Method

Summary

Describe current branch.
Assembly
Cake.Git.dll
Namespace
Cake.Git
Containing Type
GitAliases

Syntax

public static string GitDescribe(this ICakeContext context, DirectoryPath repositoryDirectoryPath, bool renderLongFormat, GitDescribeStrategy strategy, int? minimumCommitIdAbbreviatedSize)

Examples

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

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute

Parameters

Name Type Description
context ICakeContext The context.
repositoryDirectoryPath DirectoryPath Path to repository.
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<T> 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.