]> git.proxmox.com Git - pve-esxi-import-tools.git/commitdiff
version file: skip repo revision for now
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 4 Apr 2024 15:53:27 +0000 (17:53 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 4 Apr 2024 16:05:02 +0000 (18:05 +0200)
The current git revision is not exposed by cargo, so we'd need a
build.rs script to get this, like we do in PBS (well in a sub-crate to
avoid frequent costly rebuilds). For now that's not worth it, having
the version exposed is enough to see if the mount is old.

And do not concat the three version atoms manually, we can use the
CARGO_PKG_VERSION environment variable.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/fs.rs

index aed88dd600cd4684ec3e393a03fefdb218c8621b..7323da95b6f8bd7b4f87a3899532888b22984d38 100644 (file)
--- a/src/fs.rs
+++ b/src/fs.rs
@@ -245,16 +245,7 @@ mod version_file {
     use proxmox_fuse::requests;
 
     pub const INODE: u64 = 2;
-    pub const CONTENT: &str = concat!(
-        env!("CARGO_PKG_VERSION_MAJOR"),
-        ".",
-        env!("CARGO_PKG_VERSION_MINOR"),
-        ".",
-        env!("CARGO_PKG_VERSION_PATCH"),
-        "\n",
-        env!("REPOID"),
-        "\n",
-    );
+    pub const CONTENT: &str = concat!(env!("CARGO_PKG_VERSION"), "\n");
 
     pub fn stat() -> libc::stat {
         log::error!("STAT ON VERSION?");