workspace

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2025 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BumpFilename

func BumpFilename(base string, suffix string) string

func ConfigFilename

func ConfigFilename(base string) string

func Dir

func Dir(base string) string

func GetWd

func GetWd(start string) (wd string, err error)

func Initialize

func Initialize(baseDir string) error

func OpenGitRepository

func OpenGitRepository(dir string) (*git.Repository, error)

func SaveConfig

func SaveConfig(baseDir string, cfg *Config) error

func VersionFilename

func VersionFilename(base string) string

Types

type BumpLevel

type BumpLevel int
const (
	BumpLevelNone  BumpLevel = 0
	BumpLevelPatch BumpLevel = 1
	BumpLevelMinor BumpLevel = 2
	BumpLevelMajor BumpLevel = 3
)

func (BumpLevel) String

func (b BumpLevel) String() string

type Commit

type Commit struct {
	SHA  string
	When time.Time
}

func GetFirstCommitSHA

func GetFirstCommitSHA(repo *git.Repository, filename string) (*Commit, error)

type Config

type Config struct {
	Groups []ReleaseGroup `json:"groups,omitempty,omitzero" toml:"groups,omitempty,omitzero" yaml:"groups,omitempty,omitzero"`
}

func LoadConfig

func LoadConfig(baseDir string) (*Config, error)

func (*Config) IndexReleaseGroups

func (c *Config) IndexReleaseGroups() map[string]ReleaseGroup

type ReleaseGroup

type ReleaseGroup struct {
	Name         string   `json:"name" toml:"name" yaml:"name"`
	DisplayName  string   `json:"display_name,omitempty" toml:"display_name,omitempty" yaml:"display_name,omitempty"`
	ChangelogCMD []string `json:"changelog_cmd,omitempty,omitzero" toml:"changelog_cmd,omitempty,omitzero" yaml:"changelog_cmd,omitempty,omitzero"`
	CatCMD       []string `json:"cat_cmd,omitempty,omitzero" toml:"cat_cmd,omitempty,omitzero" yaml:"cat_cmd,omitempty,omitzero"`
	CurrentCMD   []string `json:"current_cmd,omitempty,omitzero" toml:"current_cmd,omitempty,omitzero" yaml:"current_cmd,omitempty,omitzero"`
	NextCMD      []string `json:"next_cmd,omitempty,omitzero" toml:"next_cmd,omitempty,omitzero" yaml:"next_cmd,omitempty,omitzero"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL