Documentation
¶
Index ¶
- func BuildChangelogPipeline(runner port.Runner, cfg *config.Config, resolver versioning.Resolver, ...) (*pipeline.ChangelogPipeline, error)
- func BuildPipeline(runner port.Runner, cfg *config.Config, resolver versioning.Resolver, ...) (*pipeline.Pipeline, error)
- func CheckCliff(runner port.Runner, driver *config.ContentDriver, mode string) error
- func CurrentTag(runner port.Runner, cfg *config.Config, env string) (string, error)
- func EffectiveCliffConfig(driver *config.ContentDriver, mode string) (string, error)
- func IsPromotionGuard(err error) bool
- func NewResolver(cfg *config.Config, env string, force bool, versionOverride string, ...) (versioning.Resolver, error)
- func PreflightCheck(runner port.Runner) error
- func RuntimeCheck(runner port.Runner, cfg *config.Config, ...)
- type PipelineOpts
- type RuntimeCheckItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildChangelogPipeline ¶ added in v0.6.0
func BuildChangelogPipeline(runner port.Runner, cfg *config.Config, resolver versioning.Resolver, opts PipelineOpts) (*pipeline.ChangelogPipeline, error)
BuildChangelogPipeline constructs a ChangelogPipeline from config.
func BuildPipeline ¶
func BuildPipeline(runner port.Runner, cfg *config.Config, resolver versioning.Resolver, opts PipelineOpts) (*pipeline.Pipeline, error)
BuildPipeline constructs a release Pipeline from config. All generator and platform instances are created here — none are created in internal/cmd/.
func CheckCliff ¶ added in v0.6.0
CheckCliff runs git-cliff --context --no-exec against the effective merged config for the given content driver. mode must be "changelog" or "release-notes". Returns nil if git-cliff accepts the config.
func CurrentTag ¶ added in v0.4.0
CurrentTag returns the latest existing git tag for the given strategy and environment. For single-env strategies, env is ignored. For per-env strategies, env is required.
func EffectiveCliffConfig ¶ added in v0.6.0
func EffectiveCliffConfig(driver *config.ContentDriver, mode string) (string, error)
EffectiveCliffConfig returns the effective merged git-cliff TOML for the given content driver and mode ("changelog" or "release-notes").
If driver is nil or has no generator set, the embedded default TOML is returned. Returns an error if driver.Generator is set to something other than "git-cliff".
func IsPromotionGuard ¶ added in v0.8.0
IsPromotionGuard reports whether err is one of the per-env promotion guards (E001/E002/E003 from ADR-0007). The cmd layer uses this to map such failures to exit code 4 without importing the perenv package directly.
func NewResolver ¶
func NewResolver(cfg *config.Config, env string, force bool, versionOverride string, runner port.Runner) (versioning.Resolver, error)
NewResolver builds the appropriate versioning.Resolver from config. env is the active environment name (empty for non-per-env strategies). force is the --force flag value. versionOverride is set when --version X.Y.Z is passed.
func PreflightCheck ¶ added in v0.6.0
PreflightCheck verifies git binary availability and git user name/email. Called automatically before heraut release and heraut changelog.
func RuntimeCheck ¶ added in v0.6.0
func RuntimeCheck(runner port.Runner, cfg *config.Config, dispatch func(name string, run func() RuntimeCheckItem))
RuntimeCheck verifies all runtime dependencies by calling dispatch once per check. dispatch receives the check name (for display before the check runs) and a run function that performs the check and returns the result. The caller decides how to present each item (spinner, plain line, etc.).
Check order: git binary → working tree → generators → platforms → git user identity.
Types ¶
type PipelineOpts ¶
type PipelineOpts struct {
DryRun bool
Force bool
VersionOverride string
Env string
Out io.Writer
// Commit and Tag are used by the changelog pipeline only.
Commit bool
Tag bool
}
PipelineOpts carries runtime options for building a pipeline.
type RuntimeCheckItem ¶ added in v0.6.0
type RuntimeCheckItem struct {
Name string
Value string // resolved value (e.g. version string, identity, "clean")
Err error
IsWarn bool // advisory only — shown with ! but does not fail the overall check
}
RuntimeCheckItem records the outcome of one runtime check.