Anki/build/configure/src/main.rs
Damien Elmes db4936d87e Detect incorrect usage of triple slash in TypeScript (#2524)
* Migrate check_copyright to Rust

* Add a new lint to check accidental usages of /// in ts/svelte comments

* Fix a bunch of incorrect jdoc comments

* Move contributor check into minilints

Will allow users to detect the issue locally with './ninja check'
before pushing to CI.

* Make Cargo.toml consistent with other crates
2023-05-26 12:49:44 +10:00

62 lines
1.3 KiB
Rust

// Copyright: Ankitects Pty Ltd and contributors
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
mod aqt;
mod bundle;
mod platform;
mod proto;
mod pylib;
mod python;
mod rust;
mod web;
use aqt::build_and_check_aqt;
use bundle::build_bundle;
use ninja_gen::python::setup_python;
use ninja_gen::Build;
use ninja_gen::Result;
use pylib::build_pylib;
use pylib::check_pylib;
use python::check_python;
use python::setup_venv;
use rust::build_rust;
use rust::check_minilints;
use rust::check_rust;
use web::build_and_check_web;
use web::check_sql;
use crate::proto::check_proto;
fn anki_version() -> String {
std::fs::read_to_string(".version")
.unwrap()
.trim()
.to_string()
}
fn main() -> Result<()> {
let mut build = Build::new()?;
let build = &mut build;
setup_python(build)?;
setup_venv(build)?;
build_rust(build)?;
build_pylib(build)?;
build_and_check_web(build)?;
build_and_check_aqt(build)?;
build_bundle(build)?;
check_rust(build)?;
check_pylib(build)?;
check_python(build)?;
check_proto(build)?;
check_sql(build)?;
check_minilints(build)?;
build.trailing_text = "default pylib/anki qt/aqt\n".into();
build.write_build_file();
Ok(())
}