We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ae1304 commit adeb33cCopy full SHA for adeb33c
build.rs
@@ -1,15 +1,9 @@
1
use std::env;
2
3
#[cfg(feature = "version")]
4
-fn commit_hash() {
5
- use vergen::{Config, ShaKind};
6
-
7
- let mut config = Config::default();
8
- *config.git_mut().sha_kind_mut() = ShaKind::Short;
9
10
- if let Err(e) = vergen::vergen(config) {
11
- eprintln!("{}", e);
12
- }
+fn emit_variables() -> Result<(), Box<dyn std::error::Error>> {
+ vergen::EmitBuilder::builder().emit()?;
+ Ok(())
13
}
14
15
fn build_macos() {
@@ -28,5 +22,5 @@ fn main() {
28
22
29
23
30
24
31
- commit_hash()
25
+ emit_variables();
32
26
0 commit comments