Co-authored-by: Nilton Constantino <nilton.constantino@visma.com>
Reviewed-on: #8
This commit is contained in:
2026-03-24 13:40:22 +00:00
co-authored by Nilton Constantino
parent 05838d10b0
commit f9120e740b
128 changed files with 19414 additions and 4567 deletions
+20 -4
View File
@@ -37,6 +37,10 @@ enum Commands {
Build {
/// Project source directory.
project_dir: String,
/// Whether to explain the dependency resolution process.
#[arg(long)]
explain_deps: bool,
},
/// Packages a cartridge directory into a distributable .pmc file.
Pack {
@@ -56,6 +60,10 @@ enum VerifyCommands {
C {
/// Project directory
project_dir: String,
/// Whether to explain the dependency resolution process.
#[arg(long)]
explain_deps: bool,
},
/// Verifies a cartridge or PMC file
P {
@@ -86,15 +94,23 @@ fn main() {
&["--debug", &cart, "--port", &port.to_string()],
);
}
Some(Commands::Build { project_dir }) => {
dispatch(&exe_dir, "prometeuc", &["build", &project_dir]);
Some(Commands::Build { project_dir, explain_deps }) => {
let mut args = vec!["build", &project_dir];
if explain_deps {
args.push("--explain-deps");
}
dispatch(&exe_dir, "prometeuc", &args);
}
Some(Commands::Pack { .. }) => {
not_implemented("pack", "prometeup");
}
Some(Commands::Verify { target }) => match target {
VerifyCommands::C { project_dir } => {
dispatch(&exe_dir, "prometeuc", &["verify", &project_dir]);
VerifyCommands::C { project_dir, explain_deps } => {
let mut args = vec!["verify", &project_dir];
if explain_deps {
args.push("--explain-deps");
}
dispatch(&exe_dir, "prometeuc", &args);
}
VerifyCommands::P { .. } => not_implemented("verify p", "prometeup"),
},