Path: blob/main/tools/build-templated-pages/src/main.rs
6595 views
//! Tool used to build the templated pages of the Bevy website.12use bitflags::bitflags;34mod examples;5mod features;67bitflags! {8#[derive(Clone, Copy, Debug, PartialEq, Eq)]9struct Command: u32 {10const CHECK_MISSING = 0b00000001;11const UPDATE = 0b00000010;12}13}1415bitflags! {16#[derive(Clone, Copy, Debug, PartialEq, Eq)]17struct Target: u32 {18const EXAMPLES = 0b00000001;19const FEATURES = 0b00000010;20}21}2223fn main() {24let what_to_run = match std::env::args().nth(1).as_deref() {25Some("check-missing") => Command::CHECK_MISSING,26Some("update") => Command::UPDATE,27_ => Command::all(),28};2930let target = match std::env::args().nth(2).as_deref() {31Some("examples") => Target::EXAMPLES,32Some("features") => Target::FEATURES,33_ => Target::all(),34};3536if target.contains(Target::EXAMPLES) {37examples::check(what_to_run);38}39if target.contains(Target::FEATURES) {40features::check(what_to_run);41}42}434445