From f2d588d0b2d8fc38a0a33dd57a4f9b621a34f505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCller?= Date: Thu, 5 Jan 2023 20:12:54 -0800 Subject: [PATCH] Switch to using grev::git_revision_auto() function in build.rs 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. --- Cargo.toml | 2 +- build.rs | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4b8106c..27bd84d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/build.rs b/build.rs index e32db71..a4dd53f 100644 --- a/build.rs +++ b/build.rs @@ -1,16 +1,14 @@ -// Copyright (C) 2021-2022 Daniel Mueller +// Copyright (C) 2021-2023 Daniel Mueller // 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"),