From: Otto Moerbeek Date: Wed, 29 Oct 2025 11:31:12 +0000 (+0100) Subject: Make version number in rust lib confirm to Rust specifics X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b141ed0805e14bf50b8dd01aa7f4d84e26d45fdf;p=thirdparty%2Fpdns.git Make version number in rust lib confirm to Rust specifics Signed-off-by: Otto Moerbeek --- diff --git a/builder-support/helpers/update-rust-library-version.py b/builder-support/helpers/update-rust-library-version.py index ca722384f7..8890429380 100755 --- a/builder-support/helpers/update-rust-library-version.py +++ b/builder-support/helpers/update-rust-library-version.py @@ -4,6 +4,7 @@ import shutil import sys import tempfile +import re def main(): if len(sys.argv) != 4: @@ -14,6 +15,8 @@ def main(): package_name = sys.argv[2] version = sys.argv[3] + # convert the serial so that it conforms to Rust rules: x.x.x-whatever + version = re.sub(r'([0-9]+\.[0-9]+\.[0-9]+)\.', r'\1-', version) with tempfile.NamedTemporaryFile(mode='w+t', encoding='utf-8', delete=False) as generated_fp: with open(file_name, 'r', encoding='utf-8') as cargo_file: in_rust_package_section = False