Skip to content

Commit

Permalink
Use Cargo.toml to generate clap command (#4)
Browse files Browse the repository at this point in the history
Use Cargo.toml to generate clap command
  • Loading branch information
aleasims authored Oct 22, 2024
1 parent f243e26 commit ccb0a41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.1.0"
edition = "2021"
authors = ["Gevulot Team"]
repository = "https://github.com/gevulotnetwork/gvltctl"
description = "Gevulot Control CLI"

[dependencies]
# TODO: change rev to tag when available
Expand Down
7 changes: 2 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use std::io::{self, Read, Write};
mod builders;
mod commands;

use commands::{build::*, pins::*, tasks::*, workers::*, sudo::*};
use commands::{build::*, pins::*, sudo::*, tasks::*, workers::*};

/// Main entry point for the Gevulot Control CLI application.
///
Expand Down Expand Up @@ -124,10 +124,7 @@ fn setup_command_line_args() -> Result<Command, Box<dyn std::error::Error>> {
.action(ArgAction::Set),
];

Ok(Command::new("gvltctl")
.version("1.0")
.author("Author Name <[email protected]>")
.about("Gevulot Control CLI")
Ok(clap::command!()
.subcommand_required(true)
// Worker subcommand
.subcommand(
Expand Down

0 comments on commit ccb0a41

Please sign in to comment.