Skip to content

Commit

Permalink
Rename get git last commit message example
Browse files Browse the repository at this point in the history
  • Loading branch information
pymongo committed Oct 12, 2020
1 parent 8207c28 commit 54a55c4
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.output()?;
let last_commit_str = String::from_utf8(cmd_res.stdout)?;
let last_commit: CommitInfo = toml::de::from_str(&last_commit_str)?;
dbg!(last_commit);
dbg!(&last_commit);
// if in build.rs, emit git_last_commit_info to compile time and retired use env! as const &st
// println!("cargo:rustc-env={}={}", "LAST_COMMIT_HASH", last_commit.hash);
// println!("cargo:rustc-env={}={}", "LAST_COMMIT_DATE", last_commit.date);
// println!("cargo:rustc-env={}={}", "LAST_COMMIT_MESSAGE", last_commit.message);
Ok(())
}

0 comments on commit 54a55c4

Please sign in to comment.