Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 44 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ tracing = "0.1.44"
tracing-journald = "0.3.2"
tracing-subscriber = "0.3.23"
uuid = "1.23"
vergen-gitcl = "9.1.0"
vergen-gitcl = "10.0.0"
wasi-common = "45.0.1"
wasmedge-sdk = "0.14.0"
wasmer = "7.0.1"
Expand Down
14 changes: 10 additions & 4 deletions crates/youki/build.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
use anyhow::Result;
use vergen_gitcl::{Emitter, GitclBuilder, RustcBuilder};
use vergen_gitcl::{Emitter, Gitcl, Rustc};

pub fn main() -> Result<()> {
// git failing is possible as we might be building in a bare
// repo without .git history ; which is why we have a workaround
// rustc failure is rarer, and we do not have a workaround in place
// so we only match for error of git, and bubble up all other errors
// via ? do error out the build
// also see https://github.com/rustyhorde/vergen/issues/174#issuecomment-3631861105
if Emitter::default()
.add_instructions(&GitclBuilder::all_git()?)?
.add_instructions(&RustcBuilder::all_rustc()?)?
.emit()
.add_instructions(&Rustc::all_rustc())?
.add_instructions(&Gitcl::all_git())
.and_then(|emitter| emitter.emit())
.is_err()
{
// currently we only inject git sha, so just this
Expand Down
Loading