-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
454c3c3
commit 77ae0b5
Showing
10 changed files
with
97 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,26 @@ | ||
use std::{path::Path, sync::Arc}; | ||
use std::{path::{Path, PathBuf}, sync::Arc}; | ||
|
||
use anyhow::Result; | ||
|
||
use crate::api::app::App; | ||
|
||
#[derive(clap::Args)] | ||
pub struct Args { | ||
|
||
#[arg(long, default_value = "output/server")] | ||
pub output: PathBuf, | ||
} | ||
|
||
pub async fn run(app: Arc<App>, args: Args) -> Result<()> { | ||
let base = Path::new("./output/server"); | ||
let Some(server_path) = app.server.read().await.as_ref().map(|(path, _)| path.parent().unwrap().to_owned()) else { | ||
log::error!("No `server.toml` found to build server"); | ||
return Ok(()) | ||
}; | ||
|
||
let base = server_path.join(&args.output); | ||
|
||
log::info!("Build output: {base:?}"); | ||
|
||
app.action_build(base).await?; | ||
app.action_build(&base).await?; | ||
|
||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters