Class RepositoryStateReader
java.lang.Object
io.github.joke.conventionalversion.git.RepositoryStateReader
Gathers everything the calculation needs from a checkout.
The changelog says which version was last released, the tag says where. Tags alone are not enough: release-please's notion of "released" is a GitHub Release it created, so a tag made by hand is invisible to it and reading the highest tag would disagree with release-please exactly when someone has tagged manually.
-
Constructor Summary
ConstructorsConstructorDescriptionRepositoryStateReader(GitRepository repository, ChangelogReader changelogReader, Path projectDirectory) -
Method Summary
Modifier and TypeMethodDescriptionAn empty repository has no HEAD to log, which is still the "never released" case.protected Optional<SemanticVersion> protected StringAn absent changelog is the "never released" case, not an error.protected RepositoryStatestateAtRelease(SemanticVersion recorded, String tagPrefix, String headSha) protected RepositoryStatestateWithoutRelease(String headSha)
-
Constructor Details
-
RepositoryStateReader
public RepositoryStateReader(GitRepository repository, ChangelogReader changelogReader, Path projectDirectory)
-
-
Method Details
-
read
-
findRecordedRelease
-
readChangelog
An absent changelog is the "never released" case, not an error. -
stateAtRelease
@VisibleForTesting protected RepositoryState stateAtRelease(SemanticVersion recorded, String tagPrefix, String headSha) -
stateWithoutRelease
-
allCommitMessages
-