Skip to content

Commit cd37c0f

Browse files
authored
Update vergen to 8.1 and clean up version print mechanism (#400)
1 parent 1be9ad8 commit cd37c0f

File tree

5 files changed

+94
-182
lines changed

5 files changed

+94
-182
lines changed

Cargo.lock

Lines changed: 57 additions & 109 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ authors = ["Parseable Team <[email protected]>"]
55
edition = "2021"
66
rust-version = "1.67"
77
categories = ["logging", "observability", "log analytics"]
8+
build = "build.rs"
89

910
[dependencies]
11+
autometrics = "0.4.1"
1012
actix-web-httpauth = "0.8"
1113
actix-web = { version = "4.3", features = ["rustls"] }
1214
actix-cors = "0.6"
@@ -81,7 +83,7 @@ static-files = "0.2"
8183
cargo_toml = "0.15"
8284
ureq = "2.6"
8385
sha1_smol = { version = "1.0", features = ["std"] }
84-
vergen = { version = "7.5", features = ["build", "git", "cargo"] }
86+
vergen = { version = "8.1", features = ["build", "git", "cargo", "gitcl"] }
8587
zip = { version = "0.6", default_features = false, features = ["deflate"] }
8688

8789
[dev-dependencies]

server/build.rs

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,20 @@
1616
*
1717
*/
1818

19-
use vergen::{vergen, Config, ShaKind};
19+
use std::error::Error;
20+
use vergen::EmitBuilder;
2021

21-
fn main() {
22-
// Init vergen
23-
let mut config = Config::default();
24-
*config.git_mut().sha_kind_mut() = ShaKind::Short;
22+
fn main() -> Result<(), Box<dyn Error>> {
23+
ui::setup().unwrap();
2524

26-
if let Err(e) = vergen(config) {
27-
println!("cargo:warning=initializing vergen failed due to error: {e}",);
28-
}
25+
// Init vergen
26+
EmitBuilder::builder()
27+
.all_build()
28+
.all_cargo()
29+
.git_sha(true)
30+
.emit()?;
2931

30-
println!("cargo:rerun-if-changed=build.rs");
31-
println!("cargo:rerun-if-changed=Cargo.toml");
32-
println!("cargo:rerun-if-env-changed=LOCAL_ASSETS_PATH");
33-
println!("Build File running");
34-
ui::setup().unwrap()
32+
Ok(())
3533
}
3634

3735
mod ui {

0 commit comments

Comments
 (0)