fishctl/src/command/config/migrate.rs

20 lines
390 B
Rust
Raw Normal View History

2024-06-20 08:17:13 +09:00
//! `config migrate` subcommand
2024-06-20 02:42:33 +09:00
mod v20240701;
2024-06-20 02:07:34 +09:00
2024-06-21 03:41:48 +09:00
use crate::config::Revision;
2024-06-20 02:07:34 +09:00
#[derive(thiserror::Error, Debug)]
2024-06-21 03:13:58 +09:00
pub(crate) enum MigrationError {
2024-06-20 03:19:20 +09:00
#[error(transparent)]
V20240701(#[from] v20240701::Error),
2024-06-20 02:07:34 +09:00
}
2024-06-21 03:41:48 +09:00
pub(super) async fn run(revision: Revision) -> Result<(), MigrationError> {
2024-06-21 03:31:13 +09:00
match revision {
2024-06-21 03:41:48 +09:00
Revision::V20240701 => v20240701::run().await?,
2024-06-20 02:07:34 +09:00
}
Ok(())
}