-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check package.xml and CMakeLists.txt are the same
Signed-off-by: Erik Boasson <[email protected]>
- Loading branch information
Showing
2 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
read pv < <(tr '\t' ' ' < package.xml | sed -ne 's;^ *<version> *\([0-9.][0-9.]*\) *</version>;\1;p') | ||
read cv < <(tr '\t' ' ' < CMakeLists.txt | sed -ne 's;^ *project *( *CycloneDDS .*VERSION *\([0-9.][0-9.]*\)[ )].*;\1;p') | ||
echo "package.xml version: $pv" | ||
echo "CMakeLists.txt version: $cv" | ||
if [[ -z "$pv" || -z "$cv" ]] ; then | ||
echo "version extraction failed" | ||
exit 1 | ||
fi | ||
if [[ "$pv" != "$cv" ]] ; then | ||
echo "version mismatch" | ||
exit 1 | ||
fi |