Class ChangelogReader

java.lang.Object
io.github.joke.conventionalversion.calc.ChangelogReader

public class ChangelogReader extends Object
Reads the last released version out of the changelog release-please maintains.

The changelog rather than the tags is the base, because release-please's notion of "released" is a GitHub Release it created, not a git ref. A tag made by hand is invisible to it, and a tag-reading plugin would disagree with release-please exactly when someone has tagged manually.

  • Constructor Details

    • ChangelogReader

      public ChangelogReader()
  • Method Details

    • findLatestRelease

      public Optional<SemanticVersion> findLatestRelease(String changelog)
      The topmost heading is the most recent release. Returns empty when the changelog is absent or contains no parseable heading, which is the "never released" case rather than an error.