mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Add git commit hash to version info on HTTP servers
This commit is contained in:
23
Cargo.lock
generated
23
Cargo.lock
generated
@@ -447,6 +447,7 @@ version = "0.2.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"env_logger",
|
||||
"git-version",
|
||||
"hex",
|
||||
"jsonwebtoken",
|
||||
"libfj",
|
||||
@@ -700,6 +701,7 @@ dependencies = [
|
||||
"actix-web",
|
||||
"clap",
|
||||
"env_logger",
|
||||
"git-version",
|
||||
"log",
|
||||
"tokio",
|
||||
"zip",
|
||||
@@ -1423,6 +1425,26 @@ version = "0.31.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
|
||||
|
||||
[[package]]
|
||||
name = "git-version"
|
||||
version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ad568aa3db0fcbc81f2f116137f263d7304f512a1209b35b85150d3ef88ad19"
|
||||
dependencies = [
|
||||
"git-version-macro",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "git-version-macro"
|
||||
version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.96",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "glob"
|
||||
version = "0.3.2"
|
||||
@@ -3102,6 +3124,7 @@ name = "rc_microtransactions"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"env_logger",
|
||||
"git-version",
|
||||
"libfj",
|
||||
"log",
|
||||
"rocket",
|
||||
|
||||
@@ -37,3 +37,4 @@ serde = { version = "1.0", features = [ "derive" ] }
|
||||
serde_json = "1.0"
|
||||
async-trait = "0.1"
|
||||
chrono = "0.4"
|
||||
git-version = "0.3"
|
||||
|
||||
@@ -26,3 +26,4 @@ jsonwebtoken = "9"
|
||||
clap.workspace = true
|
||||
rc_core = { version = "*", optional = true, path = "../rc_core" }
|
||||
serde.workspace = true
|
||||
git-version.workspace = true
|
||||
|
||||
@@ -10,10 +10,11 @@ mod robocraft;
|
||||
fn index() -> String {
|
||||
let name = env!("CARGO_PKG_NAME");
|
||||
let version = env!("CARGO_PKG_VERSION");
|
||||
let git_version = git_version::git_version!(args = ["--always", "--dirty=+"]);
|
||||
let authors = env!("CARGO_PKG_AUTHORS");
|
||||
let license = env!("CARGO_PKG_LICENSE");
|
||||
let repo = env!("CARGO_PKG_REPOSITORY");
|
||||
format!("{} {} by [{}]\n{}\n{}", name, version, authors, license, repo)
|
||||
format!("{} {}:{} by [{}]\n{}\n{}", name, version, git_version, authors, license, repo)
|
||||
}
|
||||
|
||||
#[rocket::launch]
|
||||
|
||||
@@ -15,3 +15,4 @@ log.workspace = true
|
||||
env_logger.workspace = true
|
||||
tokio = { version = "1.43", features = [ "rt-multi-thread" ] }
|
||||
zip = "4"
|
||||
git-version.workspace = true
|
||||
|
||||
@@ -7,10 +7,11 @@ use actix_web::{App, HttpServer, Responder};
|
||||
async fn index() -> impl Responder {
|
||||
let name = env!("CARGO_PKG_NAME");
|
||||
let version = env!("CARGO_PKG_VERSION");
|
||||
let git_version = git_version::git_version!(args = ["--always", "--dirty=+"]);
|
||||
let authors = env!("CARGO_PKG_AUTHORS");
|
||||
let license = env!("CARGO_PKG_LICENSE");
|
||||
let repo = env!("CARGO_PKG_REPOSITORY");
|
||||
format!("{} {} by [{}]\n{}\n{}", name, version, authors, license, repo)
|
||||
format!("{} {}{} by [{}]\n{}\n{}", name, version, git_version, authors, license, repo)
|
||||
}
|
||||
|
||||
#[actix_web::main]
|
||||
|
||||
@@ -12,3 +12,4 @@ rocket.workspace = true
|
||||
libfj.workspace = true
|
||||
log.workspace = true
|
||||
env_logger.workspace = true
|
||||
git-version.workspace = true
|
||||
|
||||
@@ -5,10 +5,11 @@ mod robocraft;
|
||||
fn index() -> String {
|
||||
let name = env!("CARGO_PKG_NAME");
|
||||
let version = env!("CARGO_PKG_VERSION");
|
||||
let git_version = git_version::git_version!(args = ["--always", "--dirty=+"]);
|
||||
let authors = env!("CARGO_PKG_AUTHORS");
|
||||
let license = env!("CARGO_PKG_LICENSE");
|
||||
let repo = env!("CARGO_PKG_REPOSITORY");
|
||||
format!("{} {} by [{}]\n{}\n{}", name, version, authors, license, repo)
|
||||
format!("{} {}:{} by [{}]\n{}\n{}", name, version, git_version, authors, license, repo)
|
||||
}
|
||||
|
||||
#[rocket::launch]
|
||||
|
||||
Reference in New Issue
Block a user