Skip to content

Commit

Permalink
Fix vergen to use gix (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshka authored Aug 23, 2024
1 parent ed5a779 commit dde7165
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 9 deletions.
45 changes: 44 additions & 1 deletion Cargo.lock

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

3 changes: 1 addition & 2 deletions component-generated/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,4 @@ tracing-subscriber = { version = "0.3.18", features = ["env-filter", "serde"] }

[build-dependencies]
anyhow = "1.0.86"
vergen = { version = "9.0.0", features = ["build"] }
vergen-gix = "1.0.0"
vergen-gix = { version = "1.0.0", features = ["build", "cargo"] }
5 changes: 3 additions & 2 deletions component-generated/build.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
use anyhow::Result;
use vergen::{BuildBuilder, Emitter};
use vergen_gix::GixBuilder;
use vergen_gix::{BuildBuilder, CargoBuilder, Emitter, GixBuilder};

fn main() -> Result<()> {
let build = BuildBuilder::all_build()?;
let gix = GixBuilder::all_git()?;
let cargo = CargoBuilder::all_cargo()?;
Emitter::default()
.add_instructions(&build)?
.add_instructions(&gix)?
.add_instructions(&cargo)?
.emit()
}
3 changes: 1 addition & 2 deletions component/template/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,4 @@ tracing-subscriber = { version = "0.3.18", features = ["env-filter", "serde"] }

[build-dependencies]
anyhow = "1.0.86"
vergen = { version = "9.0.0", features = ["build"] }
vergen-gix = "1.0.0"
vergen-gix = { version = "1.0.0", features = ["build", "cargo"] }
5 changes: 3 additions & 2 deletions component/template/build.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
use anyhow::Result;
use vergen::{BuildBuilder, Emitter};
use vergen_gix::GixBuilder;
use vergen_gix::{BuildBuilder, CargoBuilder, Emitter, GixBuilder};

fn main() -> Result<()> {
let build = BuildBuilder::all_build()?;
let gix = GixBuilder::all_git()?;
let cargo = CargoBuilder::all_cargo()?;
Emitter::default()
.add_instructions(&build)?
.add_instructions(&gix)?
.add_instructions(&cargo)?
.emit()
}

0 comments on commit dde7165

Please sign in to comment.