pub struct HookContext {
pub phase: PhaseId,
pub project_root: PathBuf,
pub stage: Stage,
pub git_flow: GitFlowConfig,
pub shipped_version: Option<String>,
pub shipped_changelog_body: Option<String>,
}Expand description
Context passed to every hook.
Fields§
§phase: PhaseIdPhase the workflow is on.
project_root: PathBufProject root.
stage: StageStage the workflow is entering.
git_flow: GitFlowConfigGit-flow branch model.
shipped_version: Option<String>The version VersionBump actually tagged, set once it runs (GAP-7).
ChangelogAppend reads this instead of re-deriving the version from
disk, so the changelog heading and the git tag never desync — in
particular when there is no version file and version::read_version
would otherwise error and fall back to the unreleased literal.
shipped_changelog_body: Option<String>The Keep-a-Changelog-grouped body VersionBump computed, set once it
runs (D-12, T-26-11). ChangelogAppend reads this instead of
re-deriving it from live git state, for the same reason
shipped_version must be handed forward rather than re-derived:
once VersionBump has created the release tag, the range this body
was computed over collapses to empty (the tag is now the baseline),
so a re-derivation after the fact would silently produce an empty
changelog entry.
Trait Implementations§
Source§impl Clone for HookContext
impl Clone for HookContext
Source§fn clone(&self) -> HookContext
fn clone(&self) -> HookContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more