diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 12af3d64..793aafcb 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -9,7 +9,6 @@ version = "1.1.3" # For now don't bump this above what is currently shipped in RHEL9; # also keep in sync with the version in cli. rust-version = "1.75.0" -build = "build.rs" include = ["/src", "LICENSE-APACHE", "LICENSE-MIT"] diff --git a/lib/build.rs b/lib/build.rs deleted file mode 100644 index 54746b35..00000000 --- a/lib/build.rs +++ /dev/null @@ -1,22 +0,0 @@ -//! Our build script, which basically today just generates a version. - -use std::env; -use std::fs; -use std::path::Path; - -fn main() { - let out_dir = env::var_os("OUT_DIR").unwrap(); - let dest_path = Path::new(&out_dir).join("version.rs"); - fs::write( - dest_path, - " - #[allow(dead_code)] - #[allow(clippy::all)] - use clap::crate_version; - #[doc=r#\"Version string\"#] - pub const CLAP_LONG_VERSION: &str = crate_version!(); - ", - ) - .unwrap(); - println!("cargo:rerun-if-changed=build.rs"); -} diff --git a/lib/src/cli.rs b/lib/src/cli.rs index 8e429fe9..87dbb286 100644 --- a/lib/src/cli.rs +++ b/lib/src/cli.rs @@ -32,8 +32,6 @@ use crate::spec::Host; use crate::spec::ImageReference; use crate::utils::sigpolicy_from_opts; -include!(concat!(env!("OUT_DIR"), "/version.rs")); - /// Perform an upgrade operation #[derive(Debug, Parser, PartialEq, Eq)] pub(crate) struct UpgradeOpts { @@ -398,7 +396,7 @@ impl InternalsOpts { #[derive(Debug, Parser, PartialEq, Eq)] #[clap(name = "bootc")] #[clap(rename_all = "kebab-case")] -#[clap(version,long_version=CLAP_LONG_VERSION)] +#[clap(version,long_version=clap::crate_version!())] #[allow(clippy::large_enum_variant)] pub(crate) enum Opt { /// Download and queue an updated container image to apply.