From 89919020bb7430a4d8bd38382b46069ac1691fbc Mon Sep 17 00:00:00 2001 From: h-suzuki Date: Mon, 5 Feb 2024 10:52:10 +0900 Subject: [PATCH] Revert "Fix: accept any string" This reverts commit ad3993b385860656de6e4153b9e1b9e9efd7d878. --- ros2caret/verb/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ros2caret/verb/version.py b/ros2caret/verb/version.py index 7072bec..31bb0ad 100644 --- a/ros2caret/verb/version.py +++ b/ros2caret/verb/version.py @@ -32,7 +32,7 @@ def read(self,rel_path): return fp.read() def get_version(self,rel_path): - version_pattern = re.compile(r"\s*version\s*=\s*['\"](.*)['\"]") + version_pattern = re.compile(r"\s*version\s*=\s*['\"](\d+\.\d+\.\d+)['\"]") for line in self.read(rel_path).splitlines(): match = version_pattern.search(line) if match: