public class MavenVersionStrategy extends VersionStrategy
VersionStrategy.StrategySearchMode| Constructor and Description |
|---|
MavenVersionStrategy(VersionNamingConfiguration vnc,
org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.api.Git git,
MetadataRegistrar metadatas) |
| Modifier and Type | Method and Description |
|---|---|
Version |
build(Commit head,
List<Commit> parentsWithTags)
Build a version using the given information extracted from the git repository.
|
void |
setUseDirty(boolean useDirty) |
computeTagType, considerTagAsAVersionOne, enhanceVersionWithBranch, getGit, getRegistrar, getRepository, getVersionNamingConfiguration, isBaseCommitOnHead, searchDepthLimit, searchModepublic MavenVersionStrategy(VersionNamingConfiguration vnc, org.eclipse.jgit.lib.Repository repository, org.eclipse.jgit.api.Git git, MetadataRegistrar metadatas)
public Version build(Commit head, List<Commit> parentsWithTags) throws VersionCalculationException
VersionStrategybuild in class VersionStrategyhead - cannot be null the current head commitparentsWithTags - a non null list of commits that will be involved in version naming.
The list cannot be null and contains the first commit of the repository if no commit with version tag can be found.VersionCalculationException - in case an error occurred while computing the versionpublic void setUseDirty(boolean useDirty)
Copyright © 2016–2018 Matthieu Brouillard. All rights reserved.