Class RepositoryStateReader
java.lang.Object
io.github.joke.conventionalversion.git.RepositoryStateReader
Gathers what the calculation needs, once per build, for every package at once.
The manifest says which version each package last released, the tag says where. The whole first-parent history is read a single time and each package's range is sliced from it at that package's own base commit, so the number of git processes does not grow with the number of packages.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOne package and the repository facts its own range yielded. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbaseShaOf(ReleasePackage declared, SemanticVersion recorded) The commit a package's recorded release was cut at, found by the tag release-please would create.messagesOf(ReleasePackage declared, List<Commit> commits) Only the commits that touched a path this package claims contribute to its bump.read(ReleaseConfiguration configuration, Map<String, SemanticVersion> released) The state of every declared package, paired with the package itself.Where release-please keeps its configuration, which need not be the Gradle build's root.The history after a package's base commit.protected RepositoryStatestateOf(ReleasePackage declared, @Nullable SemanticVersion recorded, List<Commit> history, String headSha) protected booleantouches(ReleasePackage declared, Commit commit)
-
Constructor Details
-
RepositoryStateReader
-
-
Method Details
-
read
public List<RepositoryStateReader.PackageState> read(ReleaseConfiguration configuration, Map<String, SemanticVersion> released) The state of every declared package, paired with the package itself.Paired rather than keyed by path so that callers never look a package up and never have to handle an absent one: the pairing is the invariant, expressed in the type.
-
stateOf
@VisibleForTesting protected RepositoryState stateOf(ReleasePackage declared, @Nullable SemanticVersion recorded, List<Commit> history, String headSha) -
baseShaOf
The commit a package's recorded release was cut at, found by the tag release-please would create. -
since
-
messagesOf
Only the commits that touched a path this package claims contribute to its bump. -
touches
-
repositoryRoot
Where release-please keeps its configuration, which need not be the Gradle build's root.
-