Class GitOperations
java.lang.Object
com.palantir.gradle.revapi.GitOperations
Walks back through git history to find the most recent release tags, used as candidate "previous versions" for
revapi to compare against.
Starting from HEAD:
- Move to the first parent commit (
ref^) and verify it exists. - Run
git describe --tags --abbrev=0to find the nearest reachable tag from that commit. - If the tag is the sentinel
0.0.0, only accept it when the commit has a parent (filters out the synthetic root-commit tag used when no real releases exist yet). - Feed that tag back in as the next ref and repeat, collecting up to
TAGS_TO_RETURNtags. - Strip a leading
vfrom each tag before returning.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract com.palantir.gradle.gitversion.GitInvoker
-
Constructor Details
-
GitOperations
public GitOperations()
-
-
Method Details
-
getGitInvoker
protected abstract com.palantir.gradle.gitversion.GitInvoker getGitInvoker() -
previousGitTags
-