Skip to content

Commit

Permalink
raise if no version tag is found
Browse files Browse the repository at this point in the history
Co-authored-by: Jose Luis Rivero <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters and j-rivero authored Oct 29, 2024
1 parent 1630a52 commit b35d5d6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/print_package_xml_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
if root.tag != 'package':
raise RuntimeError('Invalid package.xml file, root tag <%s> should be <package>' % root.tag)

if root.find('version') is None:
raise RuntimeError('Invalid package.xml file, no <version> tag found.')

version_str = root.find('version').text

# validate version string using regex from catkin_pkg
Expand Down

0 comments on commit b35d5d6

Please sign in to comment.