use crate::{cli, ops::forc_build};
use clap::Parser;
use forc_util::ForcResult;
forc_util::cli_examples! {
crate::cli::Opt {
[ Compile the current projectx => "forc build" ]
[ Compile the current project from a different path => "forc build --path <PATH>" ]
[ Compile the current project without updating dependencies => "forc build --path <PATH> --locked" ]
}
}
#[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 no_encoding_v1: bool,
}
pub(crate) fn exec(command: Command) -> ForcResult<()> {
forc_build::build(command)?;
Ok(())
}