version_bump/engine
The release pipeline orchestrator.
run wires the leaf modules (git, branches, commit_parser), the plugin
registry, and the hook runners into semantic-release’s lifecycle:
- resolve the current branch and build the shared
Context - resolve each configured plugin against the registry
- verify_conditions
- find the last release from the git tags
- read & parse the commits since that release
- analyze_commits -> a release type (or stop: “no release”)
- compute the next version and build the
NextRelease - verify_release
- generate_notes -> attach to the next release
- (dry-run) report and stop
- prepare, then create & push the git tag
- publish -> collect the produced releases
- success
Any error after verify_conditions triggers the plugins’ fail hooks
before the error is returned to the caller.
Types
The outcome of a pipeline run.
released is False when nothing was published — either no commits
warranted a release, or the run was a dry-run. version/notes carry the
computed next release details when one was determined (even in a dry-run, so
callers can preview them); releases holds the artifacts published by the
publish hooks.
pub type Summary {
Summary(
released: Bool,
version: option.Option(String),
notes: option.Option(String),
releases: List(release.Release),
)
}
Constructors
-
Summary( released: Bool, version: option.Option(String), notes: option.Option(String), releases: List(release.Release), )
Values
pub fn run(
config: config.Config,
cwd: String,
env: dict.Dict(String, String),
) -> task.Task(Result(Summary, error.ReleaseError))
Run the full release pipeline for the project rooted at cwd.
Returns a Task because the publish stage is asynchronous: on Erlang the
task is synchronous; on JavaScript it is a promise. Callers run it with
task.run.