docs: update architecture and design docs with proxy reconnect and deployment strategies
This commit is contained in:
1 parent
a9a861abe1
commit
1da413568e
18 files changed
+2010
-722
No files matched your search
+15
-11
@@ -1,16 +1,20 @@
|
||||
use std::process::Command;
|
||||
use chrono::Local;
|
||||
|
||||
fn main() {
|
||||
let now = Local::now();
|
||||
let build_date = now.format("%Y.%m.%d").to_string();
|
||||
println!("cargo:rustc-env=BUILD_DATE={}", build_date);
|
||||
let git_hash = Command::new("git")
|
||||
.args(&["rev-parse", "--short", "HEAD"])
|
||||
.output()
|
||||
.ok()
|
||||
.and_then(|out| String::from_utf8(out.stdout).ok())
|
||||
.unwrap_or_else(|| "unknown".to_string());
|
||||
|
||||
let git_date = Command::new("git")
|
||||
.args(&["log", "-1", "--format=%cd", "--date=format:%Y.%m.%d"])
|
||||
.output()
|
||||
.ok()
|
||||
.and_then(|out| String::from_utf8(out.stdout).ok())
|
||||
.unwrap_or_else(|| "unknown".to_string());
|
||||
|
||||
if let Ok(output) = Command::new("git").args(&["rev-parse", "--short", "HEAD"]).output() {
|
||||
if let Ok(hash) = String::from_utf8(output.stdout) {
|
||||
println!("cargo:rustc-env=GIT_HASH={}", hash.trim());
|
||||
}
|
||||
}
|
||||
println!("cargo:rerun-if-changed=../.git/HEAD");
|
||||
println!("cargo:rerun-if-changed=../.git/index");
|
||||
let version = format!("{} ({} {})", env!("CARGO_PKG_VERSION"), git_date.trim(), git_hash.trim());
|
||||
println!("cargo:rustc-env=APP_VERSION={}", version);
|
||||
}
|
||||
Reference in new issue
Block a user