1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-21 23:00:50 +03:00

Embed templates in binary & add command to export them

This commit is contained in:
Quentin Gliech
2021-09-16 23:39:07 +02:00
parent e44197a2cc
commit 76c69485e9
15 changed files with 505 additions and 306 deletions

View File

@@ -27,12 +27,14 @@ use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilte
use self::{
config::ConfigCommand, database::DatabaseCommand, manage::ManageCommand, server::ServerCommand,
templates::TemplatesCommand,
};
mod config;
mod database;
mod manage;
mod server;
mod templates;
#[derive(Clap, Debug)]
enum Subcommand {
@@ -47,6 +49,9 @@ enum Subcommand {
/// Manage the instance
Manage(ManageCommand),
/// Templates-related commands
Templates(TemplatesCommand),
}
#[derive(Clap, Debug)]
@@ -67,6 +72,7 @@ impl RootCommand {
Some(S::Database(c)) => c.run(self).await,
Some(S::Server(c)) => c.run(self).await,
Some(S::Manage(c)) => c.run(self).await,
Some(S::Templates(c)) => c.run(self).await,
None => ServerCommand::default().run(self).await,
}
}