Split build command #41

Merged
lucas merged 4 commits from feat/split-build into master 2023-03-02 11:47:07 +01:00
3 changed files with 9 additions and 29 deletions
Showing only changes of commit 22ea4d75a1 - Show all commits

View file

@ -37,12 +37,6 @@ fn main() -> Result<()> {
tracing::trace!(default_config_path = %default_config_path.display());
let matches = command!()
.arg(Arg::new("oodle").long("oodle").help(
"The oodle library to load. This may either be:\n\
- A library name that will be searched for in the system's default paths.\n\
- A file path relative to the current working directory.\n\
- An absolute file path.",
))
.arg(
Arg::new("config")
.long("config")

View file

@ -17,9 +17,7 @@ use crate::mods::archive::Archive;
const PROJECT_CONFIG_NAME: &str = "dtmt.cfg";
pub(crate) fn command_definition() -> Command {
Command::new("build")
.about("Build a project")
.arg(
Command::new("build").about("Build a project").arg(
Arg::new("directory")
.required(false)
.value_parser(value_parser!(PathBuf))
@ -28,12 +26,6 @@ pub(crate) fn command_definition() -> Command {
If omitted, dtmt will search from the current working directory upward.",
),
)
.arg(Arg::new("oodle").long("oodle").help(
"The oodle library to load. This may either be:\n\
- A library name that will be searched for in the system's default paths.\n\
- A file path relative to the current working directory.\n\
- An absolute file path.",
))
}
#[tracing::instrument]

View file

@ -1,4 +1,4 @@
use clap::{Arg, ArgMatches, Command};
use clap::{ArgMatches, Command};
use color_eyre::eyre::Result;
mod decompress;
@ -10,12 +10,6 @@ pub(crate) fn command_definition() -> Command {
Command::new("bundle")
.subcommand_required(true)
.about("Manipulate the game's bundle files")
.arg(Arg::new("oodle").long("oodle").help(
"The oodle library to load. This may either be:\n\
- A library name that will be searched for in the system's default paths.\n\
- A file path relative to the current working directory.\n\
- An absolute file path.",
))
.subcommand(decompress::command_definition())
.subcommand(extract::command_definition())
.subcommand(inject::command_definition())