Documentation
¶
Index ¶
- func DetectCargoEcosystem(path string) bool
- func DetectDenoEcosystem(path string) bool
- func DetectGoEcosystem(path string) bool
- func DetectHelmEcosystem(path string) bool
- func DetectNPMEcosystem(path string) bool
- func DetectPythonEcosystem(path string) bool
- type CargoEcosystem
- type CargoManifest
- type CargoPackage
- type DenoConfig
- type DenoEcosystem
- type GoEcosystem
- type GoEcosystemOptions
- type Handler
- type HandlerContext
- type HandlerWithContext
- type HelmChart
- type HelmEcosystem
- type NPMEcosystem
- type PythonEcosystem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetectCargoEcosystem ¶
DetectCargoEcosystem checks if a directory contains a Rust/Cargo project
func DetectDenoEcosystem ¶
DetectDenoEcosystem checks if a directory contains a Deno project
func DetectGoEcosystem ¶
DetectGoEcosystem checks if a directory contains a Go project
func DetectHelmEcosystem ¶
DetectHelmEcosystem checks if a directory contains a Helm chart
func DetectNPMEcosystem ¶
DetectNPMEcosystem checks if a directory contains an NPM project
func DetectPythonEcosystem ¶
DetectPythonEcosystem checks if a directory contains a Python project
Types ¶
type CargoEcosystem ¶
type CargoEcosystem struct {
// contains filtered or unexported fields
}
CargoEcosystem handles version management for Rust/Cargo projects
func NewCargoEcosystem ¶
func NewCargoEcosystem(path string) *CargoEcosystem
NewCargoEcosystem creates a new Cargo ecosystem handler
func (*CargoEcosystem) GetVersionFiles ¶
func (c *CargoEcosystem) GetVersionFiles() []string
GetVersionFiles returns paths to all version-containing files
func (*CargoEcosystem) ReadVersion ¶
func (c *CargoEcosystem) ReadVersion() (semver.Version, error)
ReadVersion reads the current version from Cargo.toml
func (*CargoEcosystem) UpdateVersion ¶
func (c *CargoEcosystem) UpdateVersion(version semver.Version) error
UpdateVersion updates the version in Cargo.toml using regex replacement within the [package] section only, preserving TOML comments and formatting.
type CargoManifest ¶
type CargoManifest struct {
Package CargoPackage `toml:"package"`
}
CargoManifest represents the structure of Cargo.toml
type CargoPackage ¶
type CargoPackage struct {
Name string `toml:"name"`
Version string `toml:"version"`
Edition string `toml:"edition,omitempty"`
}
CargoPackage represents the [package] section of Cargo.toml
type DenoConfig ¶
type DenoConfig struct {
Name string `json:"name,omitempty"`
Version string `json:"version"`
Exports string `json:"exports,omitempty"`
}
DenoConfig represents the structure of deno.json/deno.jsonc
type DenoEcosystem ¶
type DenoEcosystem struct {
// contains filtered or unexported fields
}
DenoEcosystem handles version management for Deno projects
func NewDenoEcosystem ¶
func NewDenoEcosystem(path string) *DenoEcosystem
NewDenoEcosystem creates a new Deno ecosystem handler
func (*DenoEcosystem) GetVersionFiles ¶
func (d *DenoEcosystem) GetVersionFiles() []string
GetVersionFiles returns paths to all version-containing files
func (*DenoEcosystem) ReadVersion ¶
func (d *DenoEcosystem) ReadVersion() (semver.Version, error)
ReadVersion reads the current version from deno.json or deno.jsonc
func (*DenoEcosystem) UpdateVersion ¶
func (d *DenoEcosystem) UpdateVersion(version semver.Version) error
UpdateVersion updates the version in deno.json or deno.jsonc using regex replacement to preserve original formatting and comments.
type GoEcosystem ¶
type GoEcosystem struct {
// contains filtered or unexported fields
}
GoEcosystem handles version management for Go projects
func NewGoEcosystem ¶
func NewGoEcosystem(path string) *GoEcosystem
NewGoEcosystem creates a new Go ecosystem handler with default options
func NewGoEcosystemWithOptions ¶
func NewGoEcosystemWithOptions(path string, options *GoEcosystemOptions) *GoEcosystem
NewGoEcosystemWithOptions creates a new Go ecosystem handler with custom options
func (*GoEcosystem) GetVersionFiles ¶
func (g *GoEcosystem) GetVersionFiles() []string
GetVersionFiles returns paths to all version-containing files
func (*GoEcosystem) ReadVersion ¶
func (g *GoEcosystem) ReadVersion() (semver.Version, error)
ReadVersion reads the current version from Go version files Checks in order: version.go, go.mod
func (*GoEcosystem) UpdateVersion ¶
func (g *GoEcosystem) UpdateVersion(version semver.Version) error
UpdateVersion updates the version in Go version files
type GoEcosystemOptions ¶
type GoEcosystemOptions struct {
TagOnly bool // If true, only create git tags without updating version files
}
GoEcosystemOptions configures Go ecosystem behavior
type Handler ¶ added in v0.4.0
type Handler interface {
ReadVersion() (semver.Version, error)
UpdateVersion(version semver.Version) error
GetVersionFiles() []string
}
Handler provides a unified interface for ecosystem version operations
type HandlerContext ¶ added in v0.6.0
type HandlerContext struct {
AllVersions map[string]semver.Version // All package versions (new versions after bumps)
PackageConfig *config.Package // Full package configuration
}
HandlerContext provides additional context for handlers that need it
type HandlerWithContext ¶ added in v0.6.0
type HandlerWithContext interface {
Handler
SetContext(ctx *HandlerContext)
}
HandlerWithContext is an optional interface for handlers that need additional context
type HelmChart ¶
type HelmChart struct {
APIVersion string `yaml:"apiVersion"`
Name string `yaml:"name"`
Description string `yaml:"description"`
Type string `yaml:"type,omitempty"`
Version string `yaml:"version"`
AppVersion string `yaml:"appVersion,omitempty"`
}
HelmChart represents the structure of Chart.yaml
type HelmEcosystem ¶
type HelmEcosystem struct {
// contains filtered or unexported fields
}
HelmEcosystem handles version management for Helm charts
func NewHelmEcosystem ¶
func NewHelmEcosystem(path string) *HelmEcosystem
NewHelmEcosystem creates a new Helm ecosystem handler
func (*HelmEcosystem) GetVersionFiles ¶
func (h *HelmEcosystem) GetVersionFiles() []string
GetVersionFiles returns paths to all version-containing files
func (*HelmEcosystem) ReadVersion ¶
func (h *HelmEcosystem) ReadVersion() (semver.Version, error)
ReadVersion reads the current version from Chart.yaml
func (*HelmEcosystem) SetContext ¶ added in v0.6.0
func (h *HelmEcosystem) SetContext(ctx *HandlerContext)
SetContext implements HandlerWithContext
func (*HelmEcosystem) UpdateVersion ¶
func (h *HelmEcosystem) UpdateVersion(version semver.Version) error
UpdateVersion updates the version and appVersion in Chart.yaml using regex replacement to preserve YAML comments and formatting.
type NPMEcosystem ¶
type NPMEcosystem struct {
// contains filtered or unexported fields
}
NPMEcosystem handles version management for NPM/Node.js projects
func NewNPMEcosystem ¶
func NewNPMEcosystem(path string) *NPMEcosystem
NewNPMEcosystem creates a new NPM ecosystem handler
func (*NPMEcosystem) GetVersionFiles ¶
func (n *NPMEcosystem) GetVersionFiles() []string
GetVersionFiles returns paths to all version-containing files
func (*NPMEcosystem) ReadVersion ¶
func (n *NPMEcosystem) ReadVersion() (semver.Version, error)
ReadVersion reads the current version from package.json
func (*NPMEcosystem) UpdateVersion ¶
func (n *NPMEcosystem) UpdateVersion(version semver.Version) error
UpdateVersion updates the version in package.json using regex replacement to preserve original file formatting, indentation, and key order.
type PythonEcosystem ¶
type PythonEcosystem struct {
// contains filtered or unexported fields
}
PythonEcosystem handles version management for Python projects
func NewPythonEcosystem ¶
func NewPythonEcosystem(path string) *PythonEcosystem
NewPythonEcosystem creates a new Python ecosystem handler
func (*PythonEcosystem) GetVersionFiles ¶
func (p *PythonEcosystem) GetVersionFiles() []string
GetVersionFiles returns paths to all version-containing files
func (*PythonEcosystem) ReadVersion ¶
func (p *PythonEcosystem) ReadVersion() (semver.Version, error)
ReadVersion reads the current version from Python version files Checks in order: pyproject.toml, __version__.py, setup.py
func (*PythonEcosystem) UpdateVersion ¶
func (p *PythonEcosystem) UpdateVersion(version semver.Version) error
UpdateVersion updates the version in Python version files