~jakintosh/co

98bdb315e6ac0e072ee1279548405beb5a3b3162 — Jak Tiano 6 months ago 78e7777 main
added (0.2.4): 'co build' uses --source option with implicit 'cofile' instead of required operand
3 files changed, 11 insertions(+), 5 deletions(-)

M Cargo.lock
M Cargo.toml
M src/bin/co.rs
M Cargo.lock => Cargo.lock +1 -1
@@ 57,7 57,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"

[[package]]
name = "co"
version = "0.2.3"
version = "0.2.4"
dependencies = [
 "base64",
 "blake3",

M Cargo.toml => Cargo.toml +1 -1
@@ 1,6 1,6 @@
[package]
name = "co"
version = "0.2.3"
version = "0.2.4"
edition = "2021"

[profile.release]

M src/bin/co.rs => src/bin/co.rs +9 -3
@@ 9,6 9,12 @@ fn generate_command_tree<'a>() -> CLITreeNode<'a> {
        long: "name",
        description: "the target name in the library ( .example.name )",
    };
    let source_opt = CLIOption {
        parameter: true,
        short: 's',
        long: "source",
        description: "the path to the build script file",
    };

    let source_opr = CLIOperand {
        name: "source",


@@ 32,8 38,8 @@ fn generate_command_tree<'a>() -> CLITreeNode<'a> {
    };
    let build_cmd = CLICommand {
        name: "co build",
        operands: vec![source_opr],
        options: vec![],
        operands: vec![],
        options: vec![source_opt],
        function: co_build,
        description: "builds a co project",
    };


@@ 128,7 134,7 @@ fn co_assemble(input: CLICommandInput) -> Result<String, CLIError> {
    }
}
fn co_build(input: CLICommandInput) -> Result<String, CLIError> {
    let source = input.get_param("source")?;
    let source = input.get_param_opt("source").unwrap_or("cofile".into());
    match co::build(&source) {
        Ok(()) => Ok(String::from("\nco build ...ok")),
        Err(e) => Err(CLIError::Program(e)),