Merge branch 'master' into master

This commit is contained in:
YuKun Liu authored and GitHub committed 2022-02-14 09:03:23 +08:00
commit 210b456838
17 files changed
+157 -127

No files matched your search

+7 -10
View File
@@ -1,21 +1,18 @@
use std::{io::Write, path::PathBuf};
use crate::{cfg::ConfigOptsBuild, gen_page};
use structopt::StructOpt;
use super::*;
/// Build the Rust WASM app and all of its assets.
#[derive(Clone, Debug, StructOpt)]
#[structopt(name = "build")]
#[derive(Clone, Debug, Parser)]
#[clap(name = "build")]
pub struct Build {
#[structopt(flatten)]
#[clap(flatten)]
pub build: ConfigOptsBuild,
}
impl Build {
pub fn build(self) -> anyhow::Result<()> {
pub fn build(self) -> Result<()> {
let mut crate_config = crate::CrateConfig::new()?;
// change the relase state.
// change the release state.
crate_config.with_release(self.build.release);
if self.build.example.is_some() {
@@ -38,7 +35,7 @@ impl Build {
crate::builder::build_desktop(&crate_config, false)?;
}
_ => {
return Err(anyhow::anyhow!("Unsoppurt platform target."));
return custom_error!("Unsoppurt platform target.");
}
}