]> xenbits.xensource.com Git - libvirt.git/commitdiff
apibuild: remove 'v' from pattern matching
authorVictor Toso <victortoso@redhat.com>
Wed, 4 May 2022 11:11:24 +0000 (13:11 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Wed, 4 May 2022 16:12:30 +0000 (18:12 +0200)
This makes it mandatory to *not* add 'v' to version numbers.

Signed-off-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
scripts/apibuild.py

index ddc611ec58741a1b417e835696b2bd0eb0dda229..2a343208c5ea08a567da3b13d21722d12a094b85 100755 (executable)
@@ -2218,7 +2218,7 @@ class docBuilder:
                               return_comment="") -> (str, str, str):
         since = ""
         if comment is not None:
-            comment_match = re.search(r"\(?Since: v?(\d+\.\d+\.\d+\.?\d?)\)?",
+            comment_match = re.search(r"\(?Since: (\d+\.\d+\.\d+\.?\d?)\)?",
                                       comment)
             if comment_match:
                 # Remove Since tag from the comment
@@ -2229,7 +2229,7 @@ class docBuilder:
                 since = comment_match.group(1)
 
         if since == "" and return_comment is not None:
-            return_match = re.search(r"\(?Since: v?(\d+\.\d+\.\d+\.?\d?)\)?",
+            return_match = re.search(r"\(?Since: (\d+\.\d+\.\d+\.?\d?)\)?",
                                      return_comment)
             if return_match:
                 # Remove Since tag from the comment