pub mod deferral;
pub mod depgraph;
pub mod local_manifest;
pub mod manifest;
pub mod pipeline;
pub mod promote_lock;
pub mod traits;
pub mod version;
use std::path::PathBuf;
use version::BumpLevel;
#[derive(Debug, Clone)]
pub struct PackageOverride {
pub autobump: Option<BumpLevel>,
pub pipeline: Option<String>,
pub publish: Option<bool>,
}
#[derive(Debug, Clone)]
pub struct Registry {
pub name: String,
pub cargo_name: Option<String>,
pub api_url: Option<String>,
pub confirm: bool,
}
#[derive(Debug, Clone)]
pub struct Stage {
pub registry: Registry,
}
#[derive(Debug, Clone)]
pub struct Pipeline {
pub name: String,
pub stages: Vec<Stage>,
}
#[derive(Debug, Clone)]
pub struct CrateRef {
pub name: String,
pub version: String,
pub manifest_path: PathBuf,
}
#[derive(Debug, Clone, Default)]
pub struct PublishOpts {
pub allow_dirty: bool,
pub dry_run: bool,
pub skip_confirm: bool,
pub force: bool,
}
#[derive(Debug, Clone)]
pub struct CrateInfo {
pub name: String,
pub max_version: String,
}
#[derive(Debug, thiserror::Error)]
pub enum PromoteError {
#[error("publish failed for registry '{registry}': {reason}")]
PublishFailed { registry: String, reason: String },
#[error("registry query failed for '{registry}': {reason}")]
QueryFailed { registry: String, reason: String },
#[error("pipeline '{pipeline}' has no stage named '{stage}'")]
StageNotFound { pipeline: String, stage: String },
#[error("stage '{stage}' is the last stage in pipeline '{pipeline}' — nothing to promote to")]
NoNextStage { pipeline: String, stage: String },
#[error("user aborted")]
Aborted,
#[error(transparent)]
Other(#[from] anyhow::Error),
}