Documentation
¶
Index ¶
- Variables
- func EnsureReleasesUniqueValidAndMonotonic(rs []Release) error
- type History
- func (h *History) Changelog() (string, error)
- func (h *History) ChangelogForReleases(changelogTemplate *template.Template) (string, error)
- func (h *History) CurrentNotes() string
- func (h *History) CurrentVersion() Version
- func (h *History) DeclareReleases(releaseLikes ...interface{}) (*History, error)
- func (h *History) MustChangelog() string
- func (h *History) MustDeclareReleases(releaseLikes ...interface{}) *History
- func (h *History) Release(versionLike interface{}) (Release, error)
- func (h *History) WithChangelogTemplate(tmpl *template.Template) *History
- type Release
- type Version
Constants ¶
This section is empty.
Variables ¶
var DefaultChangelogTemplate = template.Must(template.New("default_changelog_template").
Parse(`# {{ .Name }} Changelog{{ range .Releases }}
## Version {{ .Version }}
{{ .Notes }}
{{ end }}`))
Functions ¶
func EnsureReleasesUniqueValidAndMonotonic ¶
Checks that a sequence of releases are monotonically decreasing with each version being a simple major, minor, or patch bump of its successor in the slice
Types ¶
type History ¶
The purpose of History is to capture version changes and change logs in a single location and use that data to generate releases and print changes to the command line to automate releases and provide a single source of truth for improved certainty around versions and releases
func NewHistory ¶
Define a new project history to which releases can be added in code e.g. var Project = relic.NewHistory().MustDeclareReleases(...)
func (*History) ChangelogForReleases ¶
func (*History) CurrentNotes ¶
Gets the release notes for the current version
func (*History) CurrentVersion ¶
func (*History) DeclareReleases ¶ added in v1.0.0
Adds releases to the History with the newest releases provided first (so latest is at top). Releases can be specified by pairs of version (string or struct), notes (string) or by sequence of Release (struct) or mixtures thereof.
func (*History) MustChangelog ¶
func (*History) MustDeclareReleases ¶ added in v1.0.0
Like DeclareReleases but will panic if the Releases list becomes invalid
type Version ¶
type Version struct {
// contains filtered or unexported fields
}