bevy_state_plugin_generator 1.1.0

A build-dependency that generates a Bevy State Plugin from a simple state definition.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::process::Command;

fn main() {
    println!("cargo::rustc-check-cfg=cfg(coverage_nightly)");
    let current_hooks = Command::new("git")
        .args(["config", "--local", "core.hooksPath"])
        .output()
        .unwrap();
    let current_hooks = String::from_utf8(current_hooks.stdout).unwrap();
    if current_hooks.trim() != "hooks" {
        let hooks_ok = Command::new("git")
            .args(["config", "--local", "core.hooksPath", "hooks"])
            .status()
            .unwrap()
            .success();
        assert!(hooks_ok);
    }
}