Skip to content

Commit b21161b

Browse files
committed
build-sys: Drop custom version glue code
It was annoying me that rust-analyzer was showing an error for our `version.rs`. Something we're doing there is wrong, maybe related to the output directory? But when I dig in a bit I don't understand how we ended up with this custom code when the clap docs show use of the `clap::crate_version` macro which looks just fine to me. Not having a `build.rs` just simplifies things. Signed-off-by: Colin Walters <[email protected]>
1 parent fa096f5 commit b21161b

File tree

3 files changed

+1
-26
lines changed

3 files changed

+1
-26
lines changed

lib/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ version = "1.1.3"
99
# For now don't bump this above what is currently shipped in RHEL9;
1010
# also keep in sync with the version in cli.
1111
rust-version = "1.75.0"
12-
build = "build.rs"
1312

1413
include = ["/src", "LICENSE-APACHE", "LICENSE-MIT"]
1514

lib/build.rs

Lines changed: 0 additions & 22 deletions
This file was deleted.

lib/src/cli.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ use crate::spec::Host;
3232
use crate::spec::ImageReference;
3333
use crate::utils::sigpolicy_from_opts;
3434

35-
include!(concat!(env!("OUT_DIR"), "/version.rs"));
36-
3735
/// Perform an upgrade operation
3836
#[derive(Debug, Parser, PartialEq, Eq)]
3937
pub(crate) struct UpgradeOpts {
@@ -398,7 +396,7 @@ impl InternalsOpts {
398396
#[derive(Debug, Parser, PartialEq, Eq)]
399397
#[clap(name = "bootc")]
400398
#[clap(rename_all = "kebab-case")]
401-
#[clap(version,long_version=CLAP_LONG_VERSION)]
399+
#[clap(version,long_version=clap::crate_version!())]
402400
#[allow(clippy::large_enum_variant)]
403401
pub(crate) enum Opt {
404402
/// Download and queue an updated container image to apply.

0 commit comments

Comments
 (0)