on main help sign in
Add version and description to CLI
commit033ac5b2f150cb5eaa5f97077112c586ee576c1c authorfabianlindfors <fabian@flapplabs.se> dateThu 3 Feb 2022, 23:26 (5 years ago) parentef6fe64
3 files changed+6−3
Cargo.toml+1−1 src/lib.rs+2−2 src/main.rs+3
Cargo.toml+1−1
@@ -17,7 +17,7 @@ serde = { version = "1.0", features = ["derive"] }
1717serde_json = "1.0"
1818typetag = "0.1.7"
1919anyhow = { version = "1.0.44", features = ["backtrace"] }
20−clap = { version = "3.0.0", features = ["derive"] }
20+clap = { version = "3.0.14", features = ["derive"] }
2121toml = "0.5"
2222version = "3.0.0"
2323colored = "2"
src/lib.rs+2−2
@@ -174,8 +174,8 @@ fn migrate(
174174 {
175175 if existing_migrations != &remaining_migrations {
176176 return Err(anyhow!(
177− "a previous migration seems to have failed without cleaning up. Please run `reshape abort` and then run migrate again."
178− ));
177+ "a previous migration seems to have failed without cleaning up. Please run `reshape abort` and then run migrate again."
178+ ));
179179 }
180180 }
181181
src/main.rs+3
@@ -12,12 +12,14 @@ use reshape::{
1212use serde::{Deserialize, Serialize};
1313
1414#[derive(Parser)]
15+#[clap(name = "Reshape", version, about)]
1516struct Opts {
1617 #[clap(subcommand)]
1718 cmd: Command,
1819}
1920
2021#[derive(Parser)]
22+#[clap(about)]
2123enum Command {
2224 Migrate(MigrateOptions),
2325 Complete(ConnectionOptions),
@@ -28,6 +30,7 @@ enum Command {
2830
2931#[derive(Args)]
3032struct MigrateOptions {
33+ // Some comment
3134 #[clap(long, short)]
3235 complete: bool,
3336 #[clap(flatten)]