forked from Myriad-Dreamin/shiroa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: bump vergen (Myriad-Dreamin#98)
- Loading branch information
1 parent
cff6de2
commit fb28ad6
Showing
4 changed files
with
59 additions
and
21 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,28 @@ | ||
use anyhow::Result; | ||
use vergen::EmitBuilder; | ||
use vergen::{BuildBuilder, CargoBuilder, Emitter, RustcBuilder}; | ||
use vergen_gitcl::GitclBuilder; | ||
|
||
fn main() -> Result<()> { | ||
let build = BuildBuilder::default().build_timestamp(true).build()?; | ||
let cargo = CargoBuilder::all_cargo()?; | ||
let rustc = RustcBuilder::default() | ||
.commit_hash(true) | ||
.semver(true) | ||
.host_triple(true) | ||
.channel(true) | ||
.llvm_version(true) | ||
.build()?; | ||
let gitcl = GitclBuilder::default() | ||
.sha(false) | ||
.describe(true, true, None) | ||
.build()?; | ||
|
||
// Emit the instructions | ||
EmitBuilder::builder() | ||
.all_cargo() | ||
.build_timestamp() | ||
.git_sha(false) | ||
.git_describe(true, true, None) | ||
.all_rustc() | ||
.emit() | ||
Emitter::default() | ||
.add_instructions(&build)? | ||
.add_instructions(&cargo)? | ||
.add_instructions(&rustc)? | ||
.add_instructions(&gitcl)? | ||
.emit()?; | ||
Ok(()) | ||
} |