yog-cli 0.52.0

Yog build tool — `yog build` compiles a mod and packages it as .yog.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! `yog build [debug|release] [--dev]`: the mod built and packaged.
//! `debug`: the `--release` build with its debug info kept (for
//! `yog-symbols`/`yog-debugger`); `release`: optimized, the debug info split
//! out beside it; `--dev`: for a game that hot-reloads it (Yog-IDLE,
//! dev.sh) — the `.yog` carries what hot reload checks.

use crate::cli::flags::{DEV, has};
use crate::cli::pipeline::{self, Platforms, symbols::Symbols};

pub(super) const WORDS: &[&str] = &["build"];

pub(super) fn run(rest: &[String]) -> Result<(), String> {
    let symbols = Symbols::of(rest.first().map(String::as_str));
    pipeline::build(symbols, has(rest, DEV), Platforms::Selected).map(|_| ())
}