Move versioning to source.

This commit is contained in:
Paul
2021-05-03 15:03:30 +01:00
parent fa960ebc94
commit c086fe7ac4
7 changed files with 14 additions and 8 deletions

View File

@@ -15,6 +15,7 @@ extern crate ctrlc;
pub mod database;
pub mod notifications;
pub mod version;
pub mod routes;
pub mod util;
@@ -39,7 +40,7 @@ async fn main() {
dotenv::dotenv().ok();
env_logger::init_from_env(env_logger::Env::default().filter_or("RUST_LOG", "info"));
info!("Starting REVOLT server.");
info!("Starting REVOLT server [version {}].", crate::version::VERSION);
util::variables::preflight_checks();
database::connect().await;

View File

@@ -9,7 +9,7 @@ use rocket_contrib::json::JsonValue;
#[get("/")]
pub async fn root() -> JsonValue {
json!({
"revolt": "0.4.1-alpha.4",
"revolt": crate::version::VERSION,
"features": {
"registration": !*DISABLE_REGISTRATION,
"captcha": {

1
src/version.rs Normal file
View File

@@ -0,0 +1 @@
pub const VERSION: &str = "0.4.1-alpha.6";