Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Changelog ¶
type Changelog struct {
// contains filtered or unexported fields
}
Changelog handles reading and writing CHANGELOG.md files
func NewChangelog ¶
func NewChangelog(fs filesystem.FileSystem) *Changelog
NewChangelog creates a new Changelog instance
func (*Changelog) Append ¶
func (cl *Changelog) Append(projectRoot string, entry *ChangelogEntry) error
Append adds a new entry to the changelog
type ChangelogEntry ¶
type ChangelogEntry struct {
Version *models.Version
Date time.Time
Changesets []*models.Changeset
}
ChangelogEntry represents an entry to be added to the changelog
type VersionFile ¶
type VersionFile struct {
// contains filtered or unexported fields
}
VersionFile handles reading and writing version.txt files
func NewVersionFile ¶
func NewVersionFile(fs filesystem.FileSystem) *VersionFile
NewVersionFile creates a new VersionFile instance
func (*VersionFile) IsEnabled ¶
func (vf *VersionFile) IsEnabled(projectRoot string) bool
IsEnabled checks if a project is enabled for versioning Returns false if version.txt contains "false" (case-insensitive) Returns true if version.txt doesn't exist or contains a valid version
type VersionStore ¶
type VersionStore interface {
Read(projectRoot string) (*models.Version, error)
Write(projectRoot string, version *models.Version) error
IsEnabled(projectRoot string) bool
}
VersionStore abstracts reading/writing project versions.
func NewVersionStore ¶
func NewVersionStore(fs filesystem.FileSystem, _ models.ProjectType) VersionStore
NewVersionStore returns the version store for the given project type.
Currently go-changeset supports Go projects only and uses version.txt.