Skip to content

Commit

Permalink
add workflow to check getdcmtags version
Browse files Browse the repository at this point in the history
  • Loading branch information
Roy Wiggins authored and Roy Wiggins committed Jun 28, 2024
1 parent 7e1db52 commit b7cd8c8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ jobs:
- name: Test with pytest
run: |
python -m pytest -vvv tests
- name: Check getdcmtags version
run: |
cd getdcmtags && ./check_version.sh
15 changes: 15 additions & 0 deletions getdcmtags/check_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

binary_version=$(../bin/ubuntu22.04/getdcmtags --version | grep -oP 'Version \K.*' )
source_version=$(grep -oP '#define VERSION "\K.*(?=")' ../getdcmtags/main.cpp)

echo "Binary version: $binary_version"
echo "Source version: $source_version"
echo ""
if [ "$binary_version" == "$source_version" ]; then
echo "Versions match."
exit 0
else
echo "Versions do not match!"
exit 1
fi

0 comments on commit b7cd8c8

Please sign in to comment.