about summary refs log tree commit diff
path: root/src/tools
diff options
context:
space:
mode:
authorklensy <klensy@users.noreply.github.com>2023-06-21 12:32:34 +0300
committerklensy <klensy@users.noreply.github.com>2023-06-21 12:32:34 +0300
commite1c3313d382871bfdace6b2f385e53d2892438b6 (patch)
tree7d1197af1255c24681a7491cd550e82446902ed3 /src/tools
parentb9d608c979ad3c0700f9f0237a8c12feb0ba44fb (diff)
rust-installer: drop clap v3, migrate to v4
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/rust-installer/Cargo.toml2
-rw-r--r--src/tools/rust-installer/src/combiner.rs22
-rw-r--r--src/tools/rust-installer/src/generator.rs26
-rw-r--r--src/tools/rust-installer/src/scripter.rs10
-rw-r--r--src/tools/rust-installer/src/tarballer.rs10
-rw-r--r--src/tools/rust-installer/src/util.rs2
6 files changed, 36 insertions, 36 deletions
diff --git a/src/tools/rust-installer/Cargo.toml b/src/tools/rust-installer/Cargo.toml
index 85e979f07bf..060c4bf75bb 100644
--- a/src/tools/rust-installer/Cargo.toml
+++ b/src/tools/rust-installer/Cargo.toml
@@ -20,4 +20,4 @@ num_cpus = "1"
 
 [dependencies.clap]
 features = ["derive"]
-version = "3.1"
+version = "4.2"
diff --git a/src/tools/rust-installer/src/combiner.rs b/src/tools/rust-installer/src/combiner.rs
index abcf59cfe36..90816a2ec6e 100644
--- a/src/tools/rust-installer/src/combiner.rs
+++ b/src/tools/rust-installer/src/combiner.rs
@@ -13,47 +13,47 @@ actor! {
     #[derive(Debug)]
     pub struct Combiner {
         /// The name of the product, for display.
-        #[clap(value_name = "NAME")]
+        #[arg(value_name = "NAME")]
         product_name: String = "Product",
 
         /// The name of the package  tarball.
-        #[clap(value_name = "NAME")]
+        #[arg(value_name = "NAME")]
         package_name: String = "package",
 
         /// The directory under lib/ where the manifest lives.
-        #[clap(value_name = "DIR")]
+        #[arg(value_name = "DIR")]
         rel_manifest_dir: String = "packagelib",
 
         /// The string to print after successful installation.
-        #[clap(value_name = "MESSAGE")]
+        #[arg(value_name = "MESSAGE")]
         success_message: String = "Installed.",
 
         /// Places to look for legacy manifests to uninstall.
-        #[clap(value_name = "DIRS")]
+        #[arg(value_name = "DIRS")]
         legacy_manifest_dirs: String = "",
 
         /// Installers to combine.
-        #[clap(value_name = "FILE,FILE")]
+        #[arg(value_name = "FILE,FILE")]
         input_tarballs: String = "",
 
         /// Directory containing files that should not be installed.
-        #[clap(value_name = "DIR")]
+        #[arg(value_name = "DIR")]
         non_installed_overlay: String = "",
 
         /// The directory to do temporary work.
-        #[clap(value_name = "DIR")]
+        #[arg(value_name = "DIR")]
         work_dir: String = "./workdir",
 
         /// The location to put the final image and tarball.
-        #[clap(value_name = "DIR")]
+        #[arg(value_name = "DIR")]
         output_dir: String = "./dist",
 
         /// The profile used to compress the tarball.
-        #[clap(value_name = "FORMAT", default_value_t)]
+        #[arg(value_name = "FORMAT", default_value_t)]
         compression_profile: CompressionProfile,
 
         /// The formats used to compress the tarball
-        #[clap(value_name = "FORMAT", default_value_t)]
+        #[arg(value_name = "FORMAT", default_value_t)]
         compression_formats: CompressionFormats,
     }
 }
diff --git a/src/tools/rust-installer/src/generator.rs b/src/tools/rust-installer/src/generator.rs
index ddd1052599d..d91a51321e4 100644
--- a/src/tools/rust-installer/src/generator.rs
+++ b/src/tools/rust-installer/src/generator.rs
@@ -11,55 +11,55 @@ actor! {
     #[derive(Debug)]
     pub struct Generator {
         /// The name of the product, for display
-        #[clap(value_name = "NAME")]
+        #[arg(value_name = "NAME")]
         product_name: String = "Product",
 
         /// The name of the component, distinct from other installed components
-        #[clap(value_name = "NAME")]
+        #[arg(value_name = "NAME")]
         component_name: String = "component",
 
         /// The name of the package, tarball
-        #[clap(value_name = "NAME")]
+        #[arg(value_name = "NAME")]
         package_name: String = "package",
 
         /// The directory under lib/ where the manifest lives
-        #[clap(value_name = "DIR")]
+        #[arg(value_name = "DIR")]
         rel_manifest_dir: String = "packagelib",
 
         /// The string to print after successful installation
-        #[clap(value_name = "MESSAGE")]
+        #[arg(value_name = "MESSAGE")]
         success_message: String = "Installed.",
 
         /// Places to look for legacy manifests to uninstall
-        #[clap(value_name = "DIRS")]
+        #[arg(value_name = "DIRS")]
         legacy_manifest_dirs: String = "",
 
         /// Directory containing files that should not be installed
-        #[clap(value_name = "DIR")]
+        #[arg(value_name = "DIR")]
         non_installed_overlay: String = "",
 
         /// Path prefixes of directories that should be installed/uninstalled in bulk
-        #[clap(value_name = "DIRS")]
+        #[arg(value_name = "DIRS")]
         bulk_dirs: String = "",
 
         /// The directory containing the installation medium
-        #[clap(value_name = "DIR")]
+        #[arg(value_name = "DIR")]
         image_dir: String = "./install_image",
 
         /// The directory to do temporary work
-        #[clap(value_name = "DIR")]
+        #[arg(value_name = "DIR")]
         work_dir: String = "./workdir",
 
         /// The location to put the final image and tarball
-        #[clap(value_name = "DIR")]
+        #[arg(value_name = "DIR")]
         output_dir: String = "./dist",
 
         /// The profile used to compress the tarball.
-        #[clap(value_name = "FORMAT", default_value_t)]
+        #[arg(value_name = "FORMAT", default_value_t)]
         compression_profile: CompressionProfile,
 
         /// The formats used to compress the tarball
-        #[clap(value_name = "FORMAT", default_value_t)]
+        #[arg(value_name = "FORMAT", default_value_t)]
         compression_formats: CompressionFormats,
     }
 }
diff --git a/src/tools/rust-installer/src/scripter.rs b/src/tools/rust-installer/src/scripter.rs
index 06affc029fd..4f5130c78f4 100644
--- a/src/tools/rust-installer/src/scripter.rs
+++ b/src/tools/rust-installer/src/scripter.rs
@@ -8,23 +8,23 @@ actor! {
     #[derive(Debug)]
     pub struct Scripter {
         /// The name of the product, for display
-        #[clap(value_name = "NAME")]
+        #[arg(value_name = "NAME")]
         product_name: String = "Product",
 
         /// The directory under lib/ where the manifest lives
-        #[clap(value_name = "DIR")]
+        #[arg(value_name = "DIR")]
         rel_manifest_dir: String = "manifestlib",
 
         /// The string to print after successful installation
-        #[clap(value_name = "MESSAGE")]
+        #[arg(value_name = "MESSAGE")]
         success_message: String = "Installed.",
 
         /// Places to look for legacy manifests to uninstall
-        #[clap(value_name = "DIRS")]
+        #[arg(value_name = "DIRS")]
         legacy_manifest_dirs: String = "",
 
         /// The name of the output script
-        #[clap(value_name = "FILE")]
+        #[arg(value_name = "FILE")]
         output_script: String = "install.sh",
     }
 }
diff --git a/src/tools/rust-installer/src/tarballer.rs b/src/tools/rust-installer/src/tarballer.rs
index 7353a49fe03..f8b48a378c9 100644
--- a/src/tools/rust-installer/src/tarballer.rs
+++ b/src/tools/rust-installer/src/tarballer.rs
@@ -14,23 +14,23 @@ actor! {
     #[derive(Debug)]
     pub struct Tarballer {
         /// The input folder to be compressed.
-        #[clap(value_name = "NAME")]
+        #[arg(value_name = "NAME")]
         input: String = "package",
 
         /// The prefix of the tarballs.
-        #[clap(value_name = "PATH")]
+        #[arg(value_name = "PATH")]
         output: String = "./dist",
 
         /// The folder in which the input is to be found.
-        #[clap(value_name = "DIR")]
+        #[arg(value_name = "DIR")]
         work_dir: String = "./workdir",
 
         /// The profile used to compress the tarball.
-        #[clap(value_name = "FORMAT", default_value_t)]
+        #[arg(value_name = "FORMAT", default_value_t)]
         compression_profile: CompressionProfile,
 
         /// The formats used to compress the tarball.
-        #[clap(value_name = "FORMAT", default_value_t)]
+        #[arg(value_name = "FORMAT", default_value_t)]
         compression_formats: CompressionFormats,
     }
 }
diff --git a/src/tools/rust-installer/src/util.rs b/src/tools/rust-installer/src/util.rs
index 6cac314b68d..b699aa8e8bf 100644
--- a/src/tools/rust-installer/src/util.rs
+++ b/src/tools/rust-installer/src/util.rs
@@ -135,7 +135,7 @@ macro_rules! actor {
         $( #[ $attr ] )+
         #[derive(clap::Args)]
         pub struct $name {
-            $( $( #[ $field_attr ] )+ #[clap(long, $(default_value = $default)*)] $field : $type, )*
+            $( $( #[ $field_attr ] )+ #[arg(long, $(default_value = $default)*)] $field : $type, )*
         }
 
         impl Default for $name {