summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-03-01 18:23:50 +0100
committerMatthias Beyer <mail@beyermatthias.de>2021-03-01 18:23:50 +0100
commit746d46d57d39b2f32d8f02454463b03f64c16cdd (patch)
tree42a116bfd1647fee01dafb9863d2e44d1b2b9935
parentd74152b84c54a34b689b4bdd624669d885921a93 (diff)
parenta503695a5f3000054a18a62076da51c946f58d7b (diff)
Merge branch 'remove-release-rm-artifact'
-rw-r--r--src/cli.rs17
-rw-r--r--src/commands/release.rs4
2 files changed, 2 insertions, 19 deletions
diff --git a/src/cli.rs b/src/cli.rs
index 0f45984..5bffbcd 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -694,7 +694,6 @@ pub fn cli<'a>() -> App<'a> {
.index(1)
.value_name("PKG")
.about("The name of the package")
- .conflicts_with("artifact_path")
.requires("package_version")
)
@@ -704,24 +703,8 @@ pub fn cli<'a>() -> App<'a> {
.index(2)
.value_name("VERSION")
.about("The exact version of the package (string match)")
- .conflicts_with("artifact_path")
.requires("package_name")
)
-
- .arg(Arg::new("artifact_path")
- .required(false)
- .multiple(false)
- .long("path")
- .value_name("PATH")
- .about("Path to a released artifact")
- .conflicts_with_all(&["package_name", "package_version"])
- )
-
- .group(ArgGroup::new("artifact_or_package")
- .args(&["package_name", "package_version", "artifact_path"])
- .multiple(true)
- .required(true)
- )
)
.subcommand(App::new("new")
diff --git a/src/commands/release.rs b/src/commands/release.rs
index 65641d5..40daf8e 100644
--- a/src/commands/release.rs
+++ b/src/commands/release.rs
@@ -197,8 +197,8 @@ pub async fn rm_release(
return Err(anyhow!("Unknown release store name: {}", release_store_name))
}
- let pname = matches.value_of("package_name").map(String::from).unwrap(); // TODO: FIXME
- let pvers = matches.value_of("package_version").map(String::from).unwrap(); // TODO: FIXME
+ let pname = matches.value_of("package_name").map(String::from).unwrap(); // safe by clap
+ let pvers = matches.value_of("package_version").map(String::from).unwrap(); // safe by clap
debug!("Remove Release called for: {:?} {:?}", pname, pvers);
let conn = crate::db::establish_connection(db_connection_config)?;