Upgrading clap version to 4.x for sky-migrate (#285)
parent
b3bc07fd49
commit
77b2b25322
@ -0,0 +1,36 @@
|
||||
use clap::Parser;
|
||||
|
||||
const HELP_TEMPLATE: &'static str = r#"
|
||||
{before-help}{name} {version}
|
||||
{author-with-newline}{about-with-newline}
|
||||
{usage-heading} {usage}
|
||||
|
||||
{all-args}{after-help}
|
||||
"#;
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(author, version, about, long_about=None, help_template=HELP_TEMPLATE)]
|
||||
pub struct Cli {
|
||||
#[arg(
|
||||
short = 'n',
|
||||
long = "new",
|
||||
help = "The <host>:<port> combo for the new instance",
|
||||
value_name = "HOST:PORT"
|
||||
)]
|
||||
pub new: String,
|
||||
|
||||
#[arg(
|
||||
short = 'p',
|
||||
long = "prevdir",
|
||||
help = "Path to the previous installation location",
|
||||
value_name = "PREVDIR"
|
||||
)]
|
||||
pub prevdir: String,
|
||||
|
||||
#[arg(
|
||||
short = 's',
|
||||
long,
|
||||
help = "Transfer entries one-by-one instead of all at once to save memory"
|
||||
)]
|
||||
pub serial: bool,
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
name: Skytable Migration Tool
|
||||
version: 0.7.0
|
||||
author: Sayan N. <ohsayan@outlook.com>
|
||||
about: |
|
||||
The Skytable migration tool allows users coming from older versions (>=0.8.0)
|
||||
to upgrade their datasets to the latest Skytable version. This tool currently
|
||||
supports versions >= 0.8.0 and upgrading it to 0.7.0. To upgrade, on needs
|
||||
to simply run:
|
||||
sky-migrate --prevdir <lastpath> --new <host>:<port>
|
||||
Where `<lastpath>` is the path to the last installation's data directory and
|
||||
`<host>` and `<port>` is the hostname and port for the new server instance
|
||||
args:
|
||||
- new:
|
||||
long: new
|
||||
takes_value: true
|
||||
required: true
|
||||
help: The <host>:<port> combo for the new instance
|
||||
value_name: new
|
||||
- prevdir:
|
||||
long: prevdir
|
||||
takes_value: true
|
||||
required: true
|
||||
help: Path to the previous installation location
|
||||
value_name: prevdir
|
||||
- serial:
|
||||
long: serial
|
||||
takes_value: false
|
||||
required: false
|
||||
help: |
|
||||
Transfer entries one-by-one instead of all at once to save memory
|
Loading…
Reference in New Issue