chore(go): use vociferate for unreleased parsing
This commit is contained in:
@@ -209,6 +209,12 @@ func RecommendedTag(rootDir string, options Options) (string, error) {
|
||||
return defaultService().RecommendedTag(rootDir, options)
|
||||
}
|
||||
|
||||
// UnreleasedBody returns the current Unreleased changelog body exactly as it
|
||||
// should appear in downstream tooling.
|
||||
func UnreleasedBody(rootDir string, options Options) (string, error) {
|
||||
return defaultService().UnreleasedBody(rootDir, options)
|
||||
}
|
||||
|
||||
// RecommendedTag returns the next semantic release tag based on current changelog state.
|
||||
func (s *Service) RecommendedTag(rootDir string, options Options) (string, error) {
|
||||
resolved, err := resolveOptions(options)
|
||||
@@ -265,6 +271,16 @@ func (s *Service) RecommendedTag(rootDir string, options Options) (string, error
|
||||
return fmt.Sprintf("v%d.%d.%d", parsed.major, parsed.minor, parsed.patch), nil
|
||||
}
|
||||
|
||||
// UnreleasedBody returns the current Unreleased changelog body.
|
||||
func (s *Service) UnreleasedBody(rootDir string, options Options) (string, error) {
|
||||
resolved, err := resolveOptions(options)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return s.readUnreleasedBody(rootDir, resolved.Changelog)
|
||||
}
|
||||
|
||||
func sectionHasEntries(unreleasedBody, sectionName string) bool {
|
||||
heading := "### " + sectionName
|
||||
sectionStart := strings.Index(unreleasedBody, heading)
|
||||
|
||||
Reference in New Issue
Block a user