pub struct ReleaseEngine { /* private fields */ }Expand description
Engine for planning and executing releases.
Implementations§
Source§impl ReleaseEngine
impl ReleaseEngine
Sourcepub fn new<F, R>(
packages_dir: impl Into<PathBuf>,
graph: DependencyGraph,
dry_run: bool,
adapter_getter: F,
reporter: R,
) -> Selfwhere
F: Fn(&Language) -> Box<dyn LanguageAdapter> + Send + Sync + 'static,
R: ReleaseReporter + 'static,
pub fn new<F, R>(
packages_dir: impl Into<PathBuf>,
graph: DependencyGraph,
dry_run: bool,
adapter_getter: F,
reporter: R,
) -> Selfwhere
F: Fn(&Language) -> Box<dyn LanguageAdapter> + Send + Sync + 'static,
R: ReleaseReporter + 'static,
Creates a new release engine.
If dry_run is true, version bumps will be planned but not executed.
The adapter_getter function is used to obtain language adapters for reading
and updating package metadata.
The reporter is used to report version bump operations without directly
writing to stdout/stderr.
Sourcepub fn plan_release(
&self,
package_name: &str,
bump_type: BumpType,
) -> Result<ReleasePlan>
pub fn plan_release( &self, package_name: &str, bump_type: BumpType, ) -> Result<ReleasePlan>
Plans a release by bumping the specified package and updating dependents.
The release plan includes:
- The target package with the requested bump type
- Dependent packages that need patch bumps
§Errors
Returns an error if the package is not found or version operations fail.
Sourcepub fn execute_release(&self, plan: &ReleasePlan) -> Result<()>
pub fn execute_release(&self, plan: &ReleasePlan) -> Result<()>
Executes a release plan by updating version numbers in package files.
If dry_run is enabled, this will only report what would be changed
without actually modifying files.
§Errors
Returns an error if version bumping fails for any package.
Auto Trait Implementations§
impl Freeze for ReleaseEngine
impl !RefUnwindSafe for ReleaseEngine
impl Send for ReleaseEngine
impl Sync for ReleaseEngine
impl Unpin for ReleaseEngine
impl !UnwindSafe for ReleaseEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more