]> git.proxmox.com Git - pve-manager.git/commit
ceph: tools: parse Ceph version in separate sub and update regex
authorMax Carrara <m.carrara@proxmox.com>
Mon, 1 Jul 2024 14:10:32 +0000 (16:10 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 22 Jul 2024 14:19:03 +0000 (16:19 +0200)
commit344b0a18d28149a47663ec7a2b957d92f21d3a20
treef4bffa2d593256f0cc33d62371282dfecad12857
parent2b0c7293a0921ba80529d6703e00a91be6d343ca
ceph: tools: parse Ceph version in separate sub and update regex

The part of the `get_local_version` sub that's concerned with actually
parsing the Ceph version is factored into a separate sub
`parse_ceph_version`. That way the parsing logic can easily be reused.

Make the version regex more maintainable declaring it as a variable,
breaking it up and commenting it by using the x flag.

Also remove the part that parses our Debian revision (e.g. -pve1) from
the version, as we do not actually include that in our Ceph builds.

The part of the regex that parses the build commit hash is made
mandatory (remove '?' after its group).

Signed-off-by: Max Carrara <m.carrara@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Igor Thaller <igor.thaller@brg9.at>
PVE/Ceph/Tools.pm