changed all variables from svn to git, included --version for receiver binary

This commit is contained in:
Dhanya Maliakal
2017-12-06 10:29:57 +01:00
parent 7436d6c8d3
commit c4a242e10a
39 changed files with 154 additions and 243 deletions

View File

@ -1,9 +1,9 @@
Path: slsDetectorsPackage/slsReceiverSoftware
URL: origin git@git.psi.ch:sls_detectors_software/slsDetectorPackage.git
Repository Root: origin git@git.psi.ch:sls_detectors_software/slsDetectorPackage.git
Repsitory UUID: b498043ea612fa3148bf1d7ea2a39c46092addf8
Revision: 687
Repsitory UUID: 7436d6c8d3538cef443e0fa76bc01762fd6cc246
Revision: 688
Branch: 3.0.1
Last Changed Author: Dhanya_Maliakal
Last Changed Rev: 3185
Last Changed Date: 2017-12-06 08:43:21.000000002 +0100 ./src/UDPStandardImplementation.cpp
Last Changed Rev: 3186
Last Changed Date: 2017-12-06 08:45:14.000000002 +0100 ./src/UDPStandardImplementation.cpp

View File

@ -1,11 +1,6 @@
//#define SVNPATH ""
#define SVNURL "git@git.psi.ch:sls_detectors_software/slsDetectorPackage.git"
//#define SVNREPPATH ""
#define SVNREPUUID "b498043ea612fa3148bf1d7ea2a39c46092addf8"
//#define SVNREV 0x3185
//#define SVNKIND ""
//#define SVNSCHED ""
#define SVNAUTH "Dhanya_Maliakal"
#define SVNREV 0x3185
#define SVNDATE 0x20171206
//
#define GITURL "git@git.psi.ch:sls_detectors_software/slsDetectorPackage.git"
#define GITREPUUID "7436d6c8d3538cef443e0fa76bc01762fd6cc246"
#define GITAUTH "Dhanya_Maliakal"
#define GITREV 0x3186
#define GITDATE 0x20171206
#define GITBRANCH "3.0.1"

View File

@ -1,11 +1,6 @@
//#define SVNPATH ""
#define SVNURL ""
//#define SVNREPPATH ""
#define SVNREPUUID ""
//#define SVNREV ""
//#define SVNKIND ""
//#define SVNSCHED ""
#define SVNAUTH ""
#define SVNREV ""
#define SVNDATE ""
//
#define GITURL ""
#define GITREPUUID ""
#define GITAUTH ""
#define GITREV ""
#define GITDATE ""
#define GITBRANCH ""

View File

@ -12,7 +12,7 @@
#include <getopt.h>
#include "slsReceiver.h"
//#include "UDPInterface.h"
#include "gitInfoReceiver.h"
using namespace std;
@ -36,6 +36,7 @@ slsReceiver::slsReceiver(int argc, char *argv[], int &success):
// These options dont set a flag. We distinguish them by their indices.
{"config", required_argument, 0, 'f'},
{"rx_tcpport", required_argument, 0, 't'},
{"version", no_argument, 0, 'v'},
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}
};
@ -44,8 +45,10 @@ slsReceiver::slsReceiver(int argc, char *argv[], int &success):
int c=0;
optind = 1;
int64_t tempval = 0;
while ( c != -1 ){
c = getopt_long (argc, argv, "hf:t:", long_options, &option_index);
c = getopt_long (argc, argv, "hvf:t:", long_options, &option_index);
// Detect the end of the options.
if (c == -1)
@ -60,6 +63,13 @@ slsReceiver::slsReceiver(int argc, char *argv[], int &success):
#endif
break;
case 'v':
tempval = GITREV;
tempval = (tempval <<32) | GITDATE;
cout << "SLS Receiver " << GITBRANCH << " (0x" << hex << tempval << ")" << endl;
success = FAIL; // to exit
break;
case 't':
sscanf(optarg, "%d", &tcpip_port_no);
break;

View File

@ -152,8 +152,8 @@ void slsReceiverTCPIPInterface::stop(){
int64_t slsReceiverTCPIPInterface::getReceiverVersion(){
int64_t retval = SVNREV;
retval= (retval <<32) | SVNDATE;
int64_t retval = GITREV;
retval= (retval <<32) | GITDATE;
return retval;
}

View File

@ -16,7 +16,7 @@ NEWDATE=$(sed "s/-//g" <<< $RDATE | awk '{print $1;}')
NEWDATE=${NEWDATE/#/0x}
#get old date from INCLFILE
OLDDATE=$(more $INCLFILE | grep '#define SVNDATE' | awk '{print $3}')
OLDDATE=$(more $INCLFILE | grep '#define GITDATE' | awk '{print $3}')
#update INCLFILE if changes
if [ "$OLDDATE" != "$NEWDATE" ]; then