mirror of
https://github.com/ilyakooo0/reshape.git
synced 2024-11-29 23:09:17 +03:00
Add version and description to CLI
This commit is contained in:
parent
ef6fe64918
commit
033ac5b2f1
@ -17,7 +17,7 @@ serde = { version = "1.0", features = ["derive"] }
|
|||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
typetag = "0.1.7"
|
typetag = "0.1.7"
|
||||||
anyhow = { version = "1.0.44", features = ["backtrace"] }
|
anyhow = { version = "1.0.44", features = ["backtrace"] }
|
||||||
clap = { version = "3.0.0", features = ["derive"] }
|
clap = { version = "3.0.14", features = ["derive"] }
|
||||||
toml = "0.5"
|
toml = "0.5"
|
||||||
version = "3.0.0"
|
version = "3.0.0"
|
||||||
colored = "2"
|
colored = "2"
|
||||||
|
@ -174,8 +174,8 @@ fn migrate(
|
|||||||
{
|
{
|
||||||
if existing_migrations != &remaining_migrations {
|
if existing_migrations != &remaining_migrations {
|
||||||
return Err(anyhow!(
|
return Err(anyhow!(
|
||||||
"a previous migration seems to have failed without cleaning up. Please run `reshape abort` and then run migrate again."
|
"a previous migration seems to have failed without cleaning up. Please run `reshape abort` and then run migrate again."
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,12 +12,14 @@ use reshape::{
|
|||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
#[derive(Parser)]
|
#[derive(Parser)]
|
||||||
|
#[clap(name = "Reshape", version, about)]
|
||||||
struct Opts {
|
struct Opts {
|
||||||
#[clap(subcommand)]
|
#[clap(subcommand)]
|
||||||
cmd: Command,
|
cmd: Command,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Parser)]
|
#[derive(Parser)]
|
||||||
|
#[clap(about)]
|
||||||
enum Command {
|
enum Command {
|
||||||
Migrate(MigrateOptions),
|
Migrate(MigrateOptions),
|
||||||
Complete(ConnectionOptions),
|
Complete(ConnectionOptions),
|
||||||
@ -28,6 +30,7 @@ enum Command {
|
|||||||
|
|
||||||
#[derive(Args)]
|
#[derive(Args)]
|
||||||
struct MigrateOptions {
|
struct MigrateOptions {
|
||||||
|
// Some comment
|
||||||
#[clap(long, short)]
|
#[clap(long, short)]
|
||||||
complete: bool,
|
complete: bool,
|
||||||
#[clap(flatten)]
|
#[clap(flatten)]
|
||||||
|
Loading…
Reference in New Issue
Block a user