beet_cli/commands/run_build.rs
1use beet::prelude::*;
2use clap::Parser;
3
4/// Build the project
5#[derive(Debug, Clone, Parser)]
6pub struct RunBuild {
7 /// 🦀 the commands that will be used to build the binary 🦀
8 #[command(flatten)]
9 pub(crate) build_cmd: CargoBuildCmd,
10}
11
12#[derive(PartialEq)]
13pub enum RunMode {
14 Once,
15 Watch,
16}
17
18
19
20impl RunBuild {
21 pub async fn run(self) -> Result {
22 App::new()
23 .add_plugins(BuildPlugin::default())
24 .set_runner(LaunchRunner::runner)
25 .run()
26 .into_result()
27 }
28}