mirror of
https://github.com/containers/youki
synced 2024-05-10 09:36:13 +02:00
bump clap and use crate_version macro
Signed-off-by: Akshat Agarwal <humancalico@disroot.org>
This commit is contained in:
parent
79f2f0dc40
commit
c230fb6848
|
@ -106,9 +106,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "3.0.0-beta.2"
|
||||
version = "3.0.0-beta.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4bd1061998a501ee7d4b6d449020df3266ca3124b941ec56cf2005c3779ca142"
|
||||
checksum = "fcd70aa5597dbc42f7217a543f9ef2768b2ef823ba29036072d30e1d88e98406"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"clap_derive",
|
||||
|
@ -117,15 +117,14 @@ dependencies = [
|
|||
"os_str_bytes",
|
||||
"strsim",
|
||||
"textwrap",
|
||||
"unicode-width",
|
||||
"vec_map",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_derive"
|
||||
version = "3.0.0-beta.2"
|
||||
version = "3.0.0-beta.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "370f715b81112975b1b69db93e0b56ea4cd4e5002ac43b2da8474106a54096a1"
|
||||
checksum = "0b5bb0d655624a0b8770d1c178fb8ffcb1f91cc722cb08f451e3dc72465421ac"
|
||||
dependencies = [
|
||||
"heck",
|
||||
"proc-macro-error",
|
||||
|
@ -599,9 +598,9 @@ checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3"
|
|||
|
||||
[[package]]
|
||||
name = "os_str_bytes"
|
||||
version = "2.4.0"
|
||||
version = "3.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "afb2e1c3ee07430c2cf76151675e583e0f19985fa6efae47d6848a3e2c824f85"
|
||||
checksum = "6acbef58a60fe69ab50510a55bc8cdd4d6cf2283d27ad338f54cb52747a9cf2d"
|
||||
|
||||
[[package]]
|
||||
name = "parking_lot"
|
||||
|
@ -700,9 +699,9 @@ checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086"
|
|||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.27"
|
||||
version = "1.0.29"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038"
|
||||
checksum = "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d"
|
||||
dependencies = [
|
||||
"unicode-xid",
|
||||
]
|
||||
|
@ -902,9 +901,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
|
|||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.72"
|
||||
version = "1.0.75"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82"
|
||||
checksum = "b7f58f7e8eaa0009c5fec437aabf511bd9933e4b2d7407bd05273c01a8906ea7"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -951,12 +950,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "textwrap"
|
||||
version = "0.12.1"
|
||||
version = "0.14.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "203008d98caf094106cfaba70acfed15e18ed3ddb7d94e49baec153a2b462789"
|
||||
dependencies = [
|
||||
"unicode-width",
|
||||
]
|
||||
checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80"
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
|
|
|
@ -10,9 +10,9 @@ default = ["systemd_cgroups"]
|
|||
systemd_cgroups = ["systemd"]
|
||||
|
||||
[dependencies.clap]
|
||||
version = "3.0.0-beta.2"
|
||||
version = "3.0.0-beta.4"
|
||||
default-features = false
|
||||
features = ["std", "suggestions", "derive"]
|
||||
features = ["std", "suggestions", "derive", "cargo"]
|
||||
|
||||
[dependencies]
|
||||
nix = "0.22.0"
|
||||
|
|
32
src/main.rs
32
src/main.rs
|
@ -7,7 +7,7 @@ use std::path::PathBuf;
|
|||
|
||||
use anyhow::bail;
|
||||
use anyhow::Result;
|
||||
use clap::Clap;
|
||||
use clap::{crate_version, Clap};
|
||||
|
||||
use nix::sys::stat::Mode;
|
||||
use nix::unistd::getuid;
|
||||
|
@ -32,7 +32,7 @@ use youki::utils::{self, create_dir_all_with_mode};
|
|||
// This takes global options as well as individual commands as specified in [OCI runtime-spec](https://github.com/opencontainers/runtime-spec/blob/master/runtime.md)
|
||||
// Also check [runc commandline documentation](https://github.com/opencontainers/runc/blob/master/man/runc.8.md) for more explanation
|
||||
#[derive(Clap, Debug)]
|
||||
#[clap(version = "0.0.0", author = "youki team")]
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
struct Opts {
|
||||
/// root directory to store container state
|
||||
#[clap(short, long)]
|
||||
|
@ -53,33 +53,33 @@ struct Opts {
|
|||
// Also for a short information, check [runc commandline documentation](https://github.com/opencontainers/runc/blob/master/man/runc.8.md)
|
||||
#[derive(Clap, Debug)]
|
||||
enum SubCommand {
|
||||
#[clap(version = "0.0.0", author = "youki team")]
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
Create(create::Create),
|
||||
#[clap(version = "0.0.0", author = "youki team")]
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
Start(start::Start),
|
||||
#[clap(version = "0.0.0", author = "youki team")]
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
Run(run::Run),
|
||||
#[clap(version = "0.0.0", author = "youki team")]
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
Exec(exec::Exec),
|
||||
#[clap(version = "0.0.0", author = "youki team")]
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
Kill(kill::Kill),
|
||||
#[clap(version = "0.0.0", author = "youki team")]
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
Delete(delete::Delete),
|
||||
#[clap(version = "0.0.0", author = "youki team")]
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
State(state::State),
|
||||
#[clap(version = "0.0.0", author = "youki team")]
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
Info(info::Info),
|
||||
#[clap(version = "0.0.0", author = "youki team")]
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
Spec(spec_json::SpecJson),
|
||||
#[clap(version = "0.0.0", author = "youki team")]
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
List(list::List),
|
||||
#[clap(version = "0.0.0", author = "youki team")]
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
Pause(pause::Pause),
|
||||
#[clap(version = "0.0.0", author = "youki team")]
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
Resume(resume::Resume),
|
||||
#[clap(version = "0.0.0", author = "youki team")]
|
||||
#[clap(version = crate_version!(), author = "youki team")]
|
||||
Events(events::Events),
|
||||
#[clap(version = "0.0.0", author = "youki team", setting=clap::AppSettings::AllowLeadingHyphen)]
|
||||
#[clap(version = crate_version!(), author = "youki team", setting=clap::AppSettings::AllowLeadingHyphen)]
|
||||
Ps(ps::Ps),
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue