MCPcopy Create free account
hub / github.com/bootc-dev/bootc / git_timestamp

Function git_timestamp

crates/xtask/src/xtask.rs:406–412  ·  view source on GitHub ↗
(sh: &Shell)

Source from the content-addressed store, hash-verified

404/// but not second because, well, we're not going to build more than once a second.
405#[context("Finding git timestamp")]
406fn git_timestamp(sh: &Shell) -> Result<String> {
407 let ts = cmd!(sh, "git show -s --format=%ct").read()?;
408 let ts = ts.trim().parse::<i64>()?;
409 let ts = chrono::DateTime::from_timestamp(ts, 0)
410 .ok_or_else(|| anyhow::anyhow!("Failed to parse timestamp"))?;
411 Ok(ts.format("%Y%m%d%H%M").to_string())
412}
413
414struct Package {
415 version: String,

Callers 1

gitrevFunction · 0.85

Calls 1

readMethod · 0.45

Tested by

no test coverage detected