use crate::cli::ReleaseCommand;
use crate::error::CommandError;
pub(crate) fn execute(command: ReleaseCommand) -> Result<(), CommandError> {
match command {
ReleaseCommand::Validate(format) => super::validate::run_validate(format),
ReleaseCommand::ChangesValidate(format) => {
super::changes_validate::run_changes_validate(format)
}
ReleaseCommand::Graph(format) => super::graph_command::run_graph(format),
ReleaseCommand::Version(format) => super::version_command::run_version(format),
ReleaseCommand::Plan(format) => super::plan_command::run_plan(format),
ReleaseCommand::Prepare { format, dry_run } => {
super::prepare_command::run_prepare(format, dry_run)
}
ReleaseCommand::PlatformValidate { format, platform } => {
super::platform_command::run_platform_validate(format, &platform)
}
ReleaseCommand::Publish { format, dry_run } => {
super::publish_command::run_publish(format, dry_run)
}
}
}