use crate::{cli, ops::forc_build};
use clap::Parser;
use forc_util::ForcResult;
forc_util::cli_examples! {
[ Compile the current project => forc "build" => r#".*could not find `Forc.toml`.*"# ]
[ Compile the current project with a different path => forc "build --path ../tests/" => r#".*could not find `Forc.toml`.*"# ]
[ Compile the current project without updating dependencies => forc "build --locked" => r#".*could not find `Forc.toml`.*"# ]
}
#[derive(Debug, Default, Parser)]
#[clap(bin_name = "forc build", version, after_help = help())]
pub struct Command {
#[clap(flatten)]
pub build: cli::shared::Build,
#[clap(long)]
pub tests: bool,
#[clap(long)]
pub experimental_new_encoding: bool,
}
pub(crate) fn exec(command: Command) -> ForcResult<()> {
forc_build::build(command)?;
Ok(())
}