Skip to content

Commit

Permalink
Switch to using grev::git_revision_auto() function in build.rs
Browse files Browse the repository at this point in the history
With the release of version 0.1.3 of the grev crate, the git_revision()
function that we were relying on in our build script has been
deprecated.
With this change we replace its usage with the recommended
git_revision_auto() function instead.
  • Loading branch information
d-e-s-o committed Jan 6, 2023
1 parent b92587b commit f2d588d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ required-features = ["clap_complete"]

[build-dependencies]
anyhow = {version = "1.0", default-features = false, features = ["std"]}
grev = {version = "0.1"}
grev = {version = "0.1.3"}

[dependencies]
apca = "0.25.0"
Expand Down
8 changes: 3 additions & 5 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
// Copyright (C) 2021-2022 Daniel Mueller <[email protected]>
// Copyright (C) 2021-2023 Daniel Mueller <[email protected]>
// SPDX-License-Identifier: GPL-3.0-or-later

use std::io::stdout;

use anyhow::Result;

use grev::get_revision as get_git_rev;
use grev::git_revision_auto;


fn main() -> Result<()> {
let dir = env!("CARGO_MANIFEST_DIR");
if let Some(git_rev) = get_git_rev(dir, stdout().lock())? {
if let Some(git_rev) = git_revision_auto(dir)? {
println!(
"cargo:rustc-env=VERSION={} ({})",
env!("CARGO_PKG_VERSION"),
Expand Down

0 comments on commit f2d588d

Please sign in to comment.