Add package.xml #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Validate package.xml | |
on: | |
pull_request: | |
jobs: | |
package-xml: | |
runs-on: ubuntu-latest | |
name: package.xml and CMake versions match | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Check versions | |
run: | | |
echo "Extract version numbers and compare" | |
package_xml_version=$(sed -nE 's/\s*<version>([0-9.]*)<\/version>\s*/\1/p' package.xml) | |
echo "Version in package.xml: ${package_xml_version}" | |
cmake_version=$(sed -nE 's/^project.*VERSION\s*([0-9.]*).*/\1/p' CMakeLists.txt) | |
echo "Version in CMake: ${cmake_version}" | |
[ $package_xml_version = $cmake_version ] |