Skip to content

Commit

Permalink
Added new mechanism to check the version of gedcmtags.
Browse files Browse the repository at this point in the history
  • Loading branch information
tblock79 committed Oct 31, 2024
1 parent ca0eb56 commit 9161971
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 12 deletions.
Binary file modified bin/ubuntu24.04/getdcmtags
Binary file not shown.
33 changes: 24 additions & 9 deletions getdcmtags/check_version.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
#!/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"
source_version=$(grep -oP '#define VERSION "getdcmtags Version \K.*(?=")' ../getdcmtags/main.cpp)
echo "Source version: $source_version"

binary_version_2004=$(strings ../bin/ubuntu20.04/getdcmtags | grep -oP "getdcmtags Version \K.*" )
echo "Binary version for Ubuntu 20.04: $binary_version_2004"

binary_version_2204=$(strings ../bin/ubuntu22.04/getdcmtags | grep -oP "getdcmtags Version \K.*" )
echo "Binary version for Ubuntu 22.04: $binary_version_2204"

binary_version_2404=$(strings ../bin/ubuntu24.04/getdcmtags | grep -oP "getdcmtags Version \K.*" )
echo "Binary version for Ubuntu 24.04: $binary_version_2404"

echo ""
if [ "$binary_version" == "$source_version" ]; then
echo "Versions match."
exit 0
else
if [ "$binary_version_2004" != "$source_version" ]; then
echo "Versions do not match!"
exit 1
fi
fi
if [ "$binary_version_2204" != "$source_version" ]; then
echo "Versions do not match!"
exit 1
fi
if [ "$binary_version_2404" != "$source_version" ]; then
echo "Versions do not match!"
exit 1
fi

echo "All versions match."
exit 0
5 changes: 2 additions & 3 deletions getdcmtags/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@

#include "tags_list.h"

#define VERSION "0.72"

#define VERSION "getdcmtags Version 0.73"

static OFString tagSpecificCharacterSet = "";
static OFString tagSeriesInstanceUID = "";
Expand Down Expand Up @@ -354,7 +353,7 @@ int main(int argc, char *argv[])
if (argc < 5)
{
std::cout << std::endl;
std::cout << "getdcmtags Version " << VERSION << std::endl;
std::cout << VERSION << std::endl;
std::cout << "------------------------" << std::endl
<< std::endl;
std::cout << "Usage: [dcm file to analyze] [sender address] [sender AET] [receiver AET] [ip:port of bookkeeper] [api key for bookkeeper]" << std::endl
Expand Down

0 comments on commit 9161971

Please sign in to comment.