Interface IGitVersionCalculator
Version calculator based on Git
Namespace: i5.Toolkit.Core.VersionTool
Assembly: cs.temp.dll.dll
Syntax
public interface IGitVersionCalculator
Methods
TryGetBranch(out String)
Tries to get the name of the currently checked out git branch
Declaration
bool TryGetBranch(out string branchName)
Parameters
| Type | Name | Description |
|---|---|---|
| String | branchName | If the branch name could be fetched, it is passed to this out parameter |
Returns
| Type | Description |
|---|---|
| Boolean | Returns true if the branch name could be fetched, otherwise false |
TryGetTotalCommitsOnBranch(out Int32)
Tries to count the number of commits on the currently checked out branch
Declaration
bool TryGetTotalCommitsOnBranch(out int commitCount)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | commitCount | If the number of commits could be calculated, it is passed to this out parameter |
Returns
| Type | Description |
|---|---|
| Boolean | Returns true if the number of commits could be calculated, otherwise false |
TryGetVersion(out String)
Tries to calculate a version string based on git's tag information
Declaration
bool TryGetVersion(out string version)
Parameters
| Type | Name | Description |
|---|---|---|
| String | version | If the version could be calculated, it is passed to this out parameter |
Returns
| Type | Description |
|---|---|
| Boolean | Returns true if the version could be calulcated, otherwise false |