Skip to content

tools/read-version: fix the tool so that it can handle version parsing errors (#4234)

Ani Sinha requested to merge anisinha/cloud-init:tools-fix into c9s

Cherry-pick the following upstream commit:

    git describe may not return version/tags in the format that the read-version
    tool expects. Make the tool robust so that it can gracefully handle
    version strings that are not in the regular format.
    We use regex to capture the details we care about, but if we cannot find them,
    we won't traceback and will continue to use version and version_long as
    expected.
    
    Signed-off-by: Ani Sinha <anisinha@redhat.com>
    (cherry picked from commit 6543c88e0781b3c2e170fdaffbe6ba9f268e986c)

Merge request reports