C# Class SimpleGitVersion.TagCollector

Discovers existing tags in the repository, resolves them by applying ReleaseTagVersion.DefinitionStrength, detects some of the possible inconsistencies and provide a GetVersionInfo to retrieve commit information.
显示文件 Open project: SimpleGitVersion/SGV-Net Class Usage Examples

Public Methods

Method Description
CloseCollect ( StringBuilder errors ) : void
RegisterAllTags ( StringBuilder errors, Repository repo, ReleaseTagParsingMode>.Func analyseInvalidTagSyntax, IEnumerable OverriddenTags ) : void
RegisterContent ( TagCommit tagCommit ) : void
RegisterOneTag ( StringBuilder errors, Commit c, string tagName, ReleaseTagParsingMode>.Func analyseInvalidTagSyntax, bool &startingVersionForCSemVerFound ) : void
TagCollector ( StringBuilder errors, Repository repo, string startingVersionForCSemVer = null, ReleaseTagParsingMode>.Func analyseInvalidTagSyntax = null, IEnumerable OverriddenTags = null, bool checkValidExistingVersions = false ) : System

Initializes a new TagCollector. Errors may be appended to the collector that can be syntaxic errors or multiple different versions applied to the same commit point.

Private Methods

Method Description
GetCommit ( string sha ) : TagCommit

Method Details

CloseCollect() public method

public CloseCollect ( StringBuilder errors ) : void
errors StringBuilder
return void

RegisterAllTags() public method

public RegisterAllTags ( StringBuilder errors, Repository repo, ReleaseTagParsingMode>.Func analyseInvalidTagSyntax, IEnumerable OverriddenTags ) : void
errors StringBuilder
repo LibGit2Sharp.Repository
analyseInvalidTagSyntax ReleaseTagParsingMode>.Func
OverriddenTags IEnumerable
return void

RegisterContent() public method

public RegisterContent ( TagCommit tagCommit ) : void
tagCommit TagCommit
return void

RegisterOneTag() public method

public RegisterOneTag ( StringBuilder errors, Commit c, string tagName, ReleaseTagParsingMode>.Func analyseInvalidTagSyntax, bool &startingVersionForCSemVerFound ) : void
errors StringBuilder
c LibGit2Sharp.Commit
tagName string
analyseInvalidTagSyntax ReleaseTagParsingMode>.Func
startingVersionForCSemVerFound bool
return void

TagCollector() public method

Initializes a new TagCollector. Errors may be appended to the collector that can be syntaxic errors or multiple different versions applied to the same commit point.
public TagCollector ( StringBuilder errors, Repository repo, string startingVersionForCSemVer = null, ReleaseTagParsingMode>.Func analyseInvalidTagSyntax = null, IEnumerable OverriddenTags = null, bool checkValidExistingVersions = false ) : System
errors StringBuilder A collector of errors. One line per error.
repo LibGit2Sharp.Repository The Git repository.
startingVersionForCSemVer string Vesion tags lower than this version will be ignored.
analyseInvalidTagSyntax ReleaseTagParsingMode>.Func /// Optional function that drives the behavior regarding malformed tags of commits. /// When null, IgnoreMalformedTag is used for all tags. ///
OverriddenTags IEnumerable Optional commits with associated tags that are applied as if they exist in the repository.
checkValidExistingVersions bool /// When true, existing versions are checked: one of the valid first version must exist and exisitng versions /// must be compact. ///
return System