Merge pull request #592 from vbrandl/dependabot/cargo/vergen-8.1.1
chore(deps): Bump vergen from 7.5.1 to 8.1.1
This commit is contained in:
commit
fd3746e781
1623
Cargo.lock
generated
1623
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@ name = "hoc"
|
||||
version = "0.33.0"
|
||||
authors = ["Valentin Brandl <vbrandl@riseup.net>"]
|
||||
edition = "2021"
|
||||
build = "build.rs"
|
||||
build = "src/build.rs"
|
||||
|
||||
[lib]
|
||||
path = "src/lib.rs"
|
||||
@ -37,8 +37,9 @@ tracing-log = "0.1.3"
|
||||
tracing-subscriber = { version = "0.3.16", features = ["registry", "env-filter"] }
|
||||
|
||||
[build-dependencies]
|
||||
anyhow = "1.0.70"
|
||||
ructe = { version = "0.16.1", features = ["mime03"] }
|
||||
vergen = { version = "7.5.1", default-features = false, features = ["git"] }
|
||||
vergen = { version = "8.1.1", default-features = false, features = ["git", "gitoxide"] }
|
||||
|
||||
[dev-dependencies]
|
||||
awc = "3.1.1"
|
||||
|
15
build.rs
15
build.rs
@ -1,15 +0,0 @@
|
||||
extern crate ructe;
|
||||
extern crate vergen;
|
||||
|
||||
use ructe::{Ructe, RucteError};
|
||||
use vergen::{vergen, Config, ShaKind};
|
||||
|
||||
fn main() -> Result<(), RucteError> {
|
||||
let mut config = Config::default();
|
||||
*config.git_mut().sha_kind_mut() = ShaKind::Short;
|
||||
vergen(config).expect("Unable to generate static repo info");
|
||||
let mut ructe = Ructe::from_env()?;
|
||||
let mut statics = ructe.statics()?;
|
||||
statics.add_files("static")?;
|
||||
ructe.compile_templates("templates")
|
||||
}
|
12
src/build.rs
Normal file
12
src/build.rs
Normal file
@ -0,0 +1,12 @@
|
||||
use anyhow::Result;
|
||||
use ructe::Ructe;
|
||||
use vergen::EmitBuilder;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
EmitBuilder::builder().git_sha(true).emit()?;
|
||||
|
||||
let mut ructe = Ructe::from_env()?;
|
||||
let mut statics = ructe.statics()?;
|
||||
statics.add_files("static")?;
|
||||
Ok(ructe.compile_templates("templates")?)
|
||||
}
|
@ -4,7 +4,7 @@ pub struct VersionInfo<'a> {
|
||||
}
|
||||
|
||||
pub(crate) const VERSION_INFO: VersionInfo = VersionInfo {
|
||||
commit: env!("VERGEN_GIT_SHA_SHORT"),
|
||||
commit: env!("VERGEN_GIT_SHA"),
|
||||
version: env!("CARGO_PKG_VERSION"),
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user