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 <jrivero@osrfoundation.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
  • Loading branch information
scpeters and j-rivero committed Oct 29, 2024
1 parent 1630a52 commit e14fd45
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 e14fd45

Please sign in to comment.