mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 11:20:04 +02:00
some more changes to make file for automatic versioning
This commit is contained in:
parent
be6925c504
commit
a583f3d6e2
@ -72,15 +72,15 @@ gotthardVirtualServer: $(SRC_MYTHEN_SVC)
|
|||||||
$(CXX) -o $@ -c $< $(INCLUDES) $(DFLAGS) -fPIC $(EPICSFLAGS) -pthread -lrt $(LIBZMQ) $(FLAGS)
|
$(CXX) -o $@ -c $< $(INCLUDES) $(DFLAGS) -fPIC $(EPICSFLAGS) -pthread -lrt $(LIBZMQ) $(FLAGS)
|
||||||
|
|
||||||
|
|
||||||
package: $(OBJS) $(DESTDIR)/libSlsDetector.so $(DESTDIR)/libSlsDetector.a
|
package: versioning $(OBJS) $(DESTDIR)/libSlsDetector.so $(DESTDIR)/libSlsDetector.a
|
||||||
|
|
||||||
|
|
||||||
|
versioning:
|
||||||
|
$(call colorecho,`./updateGitVersion.sh`)
|
||||||
|
|
||||||
$(DESTDIR)/libSlsDetector.so: $(OBJS)
|
$(DESTDIR)/libSlsDetector.so: $(OBJS)
|
||||||
$(call colorecho,"#######################################")
|
$(call colorecho,"#######################################")
|
||||||
$(call colorecho,"# Compiling slsDetector Library #")
|
$(call colorecho,"# Compiling slsDetector Library #")
|
||||||
$(call colorecho,"#######################################")
|
$(call colorecho,"#######################################")
|
||||||
$(call colorecho,`./updateGitVersion.sh`)
|
|
||||||
$(CXX) -shared -Wl,-soname,libSlsDetector.so -o libSlsDetector.so $(OBJS) -lc $(INCLUDES) $(DFLAGS) $(FLAGS) $(EPICSFLAGS) -L/usr/lib64 -pthread -lrt $(LIBZMQ)
|
$(CXX) -shared -Wl,-soname,libSlsDetector.so -o libSlsDetector.so $(OBJS) -lc $(INCLUDES) $(DFLAGS) $(FLAGS) $(EPICSFLAGS) -L/usr/lib64 -pthread -lrt $(LIBZMQ)
|
||||||
$(shell test -d $(DESTDIR) || mkdir -p $(DESTDIR))
|
$(shell test -d $(DESTDIR) || mkdir -p $(DESTDIR))
|
||||||
mv libSlsDetector.so $(DESTDIR)
|
mv libSlsDetector.so $(DESTDIR)
|
||||||
|
@ -28,7 +28,6 @@ char Module_dac_names[16][10]= {"SvP","Vtr","Vrf","Vrs","SvN","Vtgstv","Vcmp_ll
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct Module modules[10];
|
struct Module modules[10];
|
||||||
int moduleSize = 0;
|
int moduleSize = 0;
|
||||||
|
|
||||||
|
@ -12,14 +12,16 @@ SRC_CLNT = communication_funcs.c slsDetectorServer.c slsDetectorServer_funcs.c
|
|||||||
OBJS = $(SRC_CLNT:.c=.o)
|
OBJS = $(SRC_CLNT:.c=.o)
|
||||||
|
|
||||||
|
|
||||||
all: clean $(PROGS) #hv9m_blackfin_server
|
all: clean versioning $(PROGS) #hv9m_blackfin_server
|
||||||
|
|
||||||
|
|
||||||
boot: $(OBJS)
|
boot: $(OBJS)
|
||||||
|
|
||||||
|
versioning:
|
||||||
|
@echo `tput setaf 6; ./updateGitVersion.sh; tput sgr0;`
|
||||||
|
|
||||||
$(PROGS): $(OBJS)
|
$(PROGS): $(OBJS)
|
||||||
# echo $(OBJS)
|
# echo $(OBJS)
|
||||||
@echo `tput setaf 6; ./updateGitVersion.sh; tput sgr0;`
|
|
||||||
mkdir -p $(DESTDIR)
|
mkdir -p $(DESTDIR)
|
||||||
$(CC) -o $@ $(SRC_CLNT) $(CFLAGS) $(LDLIBS)
|
$(CC) -o $@ $(SRC_CLNT) $(CFLAGS) $(LDLIBS)
|
||||||
mv $(PROGS) $(DESTDIR)
|
mv $(PROGS) $(DESTDIR)
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
Path: slsDetectorsPackage/slsDetectorSoftware/eigerDetectorServer
|
Path: slsDetectorsPackage/slsDetectorSoftware/eigerDetectorServer
|
||||||
URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git/eigerDetectorServer
|
URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||||
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||||
Repsitory UUID: d4b0bef367ef407a3267619196da01dc1636865d
|
Repsitory UUID: 9f1b82c18ab0893d65bfadeb646b8ea244614632
|
||||||
Revision: 293
|
Revision: 294
|
||||||
Branch: developer
|
Branch: developer
|
||||||
Last Changed Author: Dhanya_Maliakal
|
Last Changed Author: Dhanya_Maliakal
|
||||||
Last Changed Rev: 1435
|
Last Changed Rev: 1443
|
||||||
Last Changed Date: 2017-06-28 18:16:55 +0200
|
Last Changed Date: 2017-07-10 10:50:39.000000002 +0200 ./Makefile
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
//#define SVNPATH ""
|
//#define SVNPATH ""
|
||||||
#define SVNURL "git@git.psi.ch:sls_detectors_software/sls_detector_software.git/eigerDetectorServer"
|
#define SVNURL "git@git.psi.ch:sls_detectors_software/sls_detector_software.git"
|
||||||
//#define SVNREPPATH ""
|
//#define SVNREPPATH ""
|
||||||
#define SVNREPUUID "d4b0bef367ef407a3267619196da01dc1636865d"
|
#define SVNREPUUID "9f1b82c18ab0893d65bfadeb646b8ea244614632"
|
||||||
//#define SVNREV 0x1435
|
//#define SVNREV 0x1443
|
||||||
//#define SVNKIND ""
|
//#define SVNKIND ""
|
||||||
//#define SVNSCHED ""
|
//#define SVNSCHED ""
|
||||||
#define SVNAUTH "Dhanya_Maliakal"
|
#define SVNAUTH "Dhanya_Maliakal"
|
||||||
#define SVNREV 0x1435
|
#define SVNREV 0x1443
|
||||||
#define SVNDATE 0x20170628
|
#define SVNDATE 0x20170710
|
||||||
//
|
//
|
||||||
|
@ -1,37 +1,32 @@
|
|||||||
SERVER=eigerDetectorServer
|
SERVER=eigerDetectorServer
|
||||||
|
MAINDIR=slsDetectorsPackage
|
||||||
|
SPECDIR=slsDetectorSoftware/$SERVER
|
||||||
TMPFILE=gitInfoEigerTmp.h
|
TMPFILE=gitInfoEigerTmp.h
|
||||||
INCLFILE=gitInfoEiger.h
|
INCLFILE=gitInfoEiger.h
|
||||||
|
|
||||||
WD=slsDetectorSoftware/$SERVER
|
#evaluate the variables
|
||||||
|
EVALFILE=../../evalVersionVariables.sh
|
||||||
|
source $EVALFILE
|
||||||
|
|
||||||
GITREPO1='git remote -v'
|
|
||||||
GITREPO2=" | grep \"fetch\" | cut -d' ' -f1"
|
|
||||||
BRANCH1='git branch -v'
|
|
||||||
BRANCH2=" | grep '*' | cut -d' ' -f2"
|
|
||||||
REPUID1='git log --pretty=format:"%H" -1'
|
|
||||||
AUTH1_1='git log --pretty=format:"%cn" -1'
|
|
||||||
AUTH1_2=" | cut -d' ' -f1"
|
|
||||||
AUTH2_1='git log --pretty=format:"%cn" -1'
|
|
||||||
AUTH2_2=" | cut -d' ' -f2"
|
|
||||||
FOLDERREV1='git log --oneline . ' #used for all the individual server folders
|
|
||||||
FOLDERREV2=" | wc -l" #used for all the individual server folders
|
|
||||||
REV1='git log --oneline '
|
|
||||||
REV2=" | wc -l"
|
|
||||||
RDATE1='git log --pretty=format:"%ci" -1'
|
|
||||||
|
|
||||||
GITREPO=`eval $GITREPO1 $GITREPO2`
|
#get modified date
|
||||||
BRANCH=`eval $BRANCH1 $BRANCH2`
|
#RDATE1='git log --pretty=format:"%ci" -1'
|
||||||
REPUID=`eval $REPUID1`
|
RDATE1="find ../slsDetectorServer . -type f -exec stat --format '%Y :%y %n' '{}' \; | sort -nr | cut -d: -f2- | egrep -v 'gitInfo|bin|.git|updateGitVersion|.o' | head -n 1"
|
||||||
AUTH1=`eval $AUTH1_1 $AUTH1_2`
|
|
||||||
AUTH2=`eval $AUTH2_1 $AUTH2_2`
|
|
||||||
REV=`eval $REV1 $REV2`
|
|
||||||
FOLDERREV=`eval $FOLDERREV1 $FOLDERREV2`
|
|
||||||
RDATE=`eval $RDATE1`
|
RDATE=`eval $RDATE1`
|
||||||
echo Path: slsDetectorsPackage/$WD $'\n'URL: ${GITREPO}/$SERVER $'\n'Repository Root: ${GITREPO} $'\n'Repsitory UUID: ${REPUID} $'\n'Revision: ${FOLDERREV} $'\n'Branch: ${BRANCH} $'\n'Last Changed Author: ${AUTH1}_${AUTH2} $'\n'Last Changed Rev: ${REV} $'\n'Last Changed Date: ${RDATE} > gitInfo.txt
|
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}')
|
||||||
|
|
||||||
|
|
||||||
|
#update INCLFILE if changes
|
||||||
|
if [ "$OLDDATE" != "$NEWDATE" ]; then
|
||||||
|
echo Path: ${MAINDIR}/${SPECDIR} $'\n'URL: ${GITREPO} $'\n'Repository Root: ${GITREPO} $'\n'Repsitory UUID: ${REPUID} $'\n'Revision: ${FOLDERREV} $'\n'Branch: ${BRANCH} $'\n'Last Changed Author: ${AUTH1}_${AUTH2} $'\n'Last Changed Rev: ${REV} $'\n'Last Changed Date: ${RDATE} > gitInfo.txt
|
||||||
cd ../../
|
cd ../../
|
||||||
./genVersionHeader.sh $WD/gitInfo.txt $WD/$TMPFILE $WD/$INCLFILE
|
./genVersionHeader.sh $SPECDIR/gitInfo.txt $SPECDIR/$TMPFILE $SPECDIR/$INCLFILE
|
||||||
echo "Revision Updated"
|
|
||||||
cd $WD
|
cd $WD
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
Path: slsDetectorsPackage/slsDetectorSoftware
|
Path: slsDetectorsPackage/slsDetectorSoftware
|
||||||
URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||||
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||||
Repsitory UUID: 79271ea7e3f5ac7113582e694b30b71a64d18844
|
Repsitory UUID: 9f1b82c18ab0893d65bfadeb646b8ea244614632
|
||||||
Revision: 1436
|
Revision: 1438
|
||||||
Branch: developer
|
Branch: developer
|
||||||
Last Changed Author: Dhanya_Maliakal
|
Last Changed Author: Dhanya_Maliakal
|
||||||
Last Changed Rev: 1441
|
Last Changed Rev: 1443
|
||||||
Last Changed Date: 2017-07-03 17:42:06 +0200
|
Last Changed Date: 2017-07-10 11:06:07.000000002 +0200 ./eigerDetectorServer/Feb.o
|
||||||
|
@ -21,13 +21,15 @@ OBJS = $(SRCS:%.c=%.o)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
all: clean $(PROGS)
|
all: clean versioning $(PROGS)
|
||||||
|
|
||||||
boot: $(OBJS)
|
boot: $(OBJS)
|
||||||
|
|
||||||
$(PROGS): $(OBJS)
|
versioning:
|
||||||
echo $(OBJS)
|
|
||||||
@echo `tput setaf 6; ./updateGitVersion.sh; tput sgr0;`
|
@echo `tput setaf 6; ./updateGitVersion.sh; tput sgr0;`
|
||||||
|
|
||||||
|
$(PROGS): $(OBJS)
|
||||||
|
# echo $(OBJS)
|
||||||
$(CC) $(CFLAGS) -o $@ $^ $(LDLIBS_$@) $(LDFLAGS_$@)
|
$(CC) $(CFLAGS) -o $@ $^ $(LDLIBS_$@) $(LDFLAGS_$@)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
Path: slsDetectorsPackage/slsDetectorSoftware/gotthardDetectorServer
|
Path: slsDetectorsPackage/slsDetectorSoftware/gotthardDetectorServer
|
||||||
URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git/gotthardDetectorServer
|
URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||||
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||||
Repsitory UUID: 8aceb5d4b0ca6bd95a11b53e7a799b463b92d51b
|
Repsitory UUID: 9f1b82c18ab0893d65bfadeb646b8ea244614632
|
||||||
Revision: 197
|
Revision: 203
|
||||||
Branch: developer
|
Branch: developer
|
||||||
Last Changed Author: Dhanya_Maliakal
|
Last Changed Author: Dhanya_Maliakal
|
||||||
Last Changed Rev: 334
|
Last Changed Rev: 1443
|
||||||
Last Changed Date: 2016-08-12 11:08:03 +0200
|
Last Changed Date: 2017-07-10 10:54:26.000000002 +0200 ./Makefile
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
//#define SVNPATH ""
|
//#define SVNPATH ""
|
||||||
#define SVNURL "git@git.psi.ch:sls_detectors_software/sls_detector_software.git/gotthardDetectorServer"
|
#define SVNURL "git@git.psi.ch:sls_detectors_software/sls_detector_software.git"
|
||||||
//#define SVNREPPATH ""
|
//#define SVNREPPATH ""
|
||||||
#define SVNREPUUID "8aceb5d4b0ca6bd95a11b53e7a799b463b92d51b"
|
#define SVNREPUUID "9f1b82c18ab0893d65bfadeb646b8ea244614632"
|
||||||
//#define SVNREV 0x334
|
//#define SVNREV 0x1443
|
||||||
//#define SVNKIND ""
|
//#define SVNKIND ""
|
||||||
//#define SVNSCHED ""
|
//#define SVNSCHED ""
|
||||||
#define SVNAUTH "Dhanya_Maliakal"
|
#define SVNAUTH "Dhanya_Maliakal"
|
||||||
#define SVNREV 0x334
|
#define SVNREV 0x1443
|
||||||
#define SVNDATE 0x20160812
|
#define SVNDATE 0x20170710
|
||||||
//
|
//
|
||||||
|
@ -1,35 +1,30 @@
|
|||||||
SERVER=gotthardDetectorServer
|
SERVER=gotthardDetectorServer
|
||||||
|
MAINDIR=slsDetectorsPackage
|
||||||
|
SPECDIR=slsDetectorSoftware/$SERVER
|
||||||
TMPFILE=gitInfoGotthardTmp.h
|
TMPFILE=gitInfoGotthardTmp.h
|
||||||
INCLFILE=gitInfoGotthard.h
|
INCLFILE=gitInfoGotthard.h
|
||||||
|
|
||||||
WD=slsDetectorSoftware/$SERVER
|
#evaluate the variables
|
||||||
|
EVALFILE=../../evalVersionVariables.sh
|
||||||
|
source $EVALFILE
|
||||||
|
|
||||||
GITREPO1='git remote -v'
|
|
||||||
GITREPO2=" | grep \"fetch\" | cut -d' ' -f1"
|
|
||||||
BRANCH1='git branch -v'
|
|
||||||
BRANCH2=" | grep '*' | cut -d' ' -f2"
|
|
||||||
REPUID1='git log --pretty=format:"%H" -1'
|
|
||||||
AUTH1_1='git log --pretty=format:"%cn" -1'
|
|
||||||
AUTH1_2=" | cut -d' ' -f1"
|
|
||||||
AUTH2_1='git log --pretty=format:"%cn" -1'
|
|
||||||
AUTH2_2=" | cut -d' ' -f2"
|
|
||||||
FOLDERREV1='git log --oneline . ' #used for all the individual server folders
|
|
||||||
FOLDERREV2=" | wc -l" #used for all the individual server folders
|
|
||||||
REV1='git log --oneline '
|
|
||||||
REV2=" | wc -l"
|
|
||||||
RDATE1='git log --pretty=format:"%ci" -1'
|
|
||||||
|
|
||||||
GITREPO=`eval $GITREPO1 $GITREPO2`
|
#get modified date
|
||||||
BRANCH=`eval $BRANCH1 $BRANCH2`
|
#RDATE1='git log --pretty=format:"%ci" -1'
|
||||||
REPUID=`eval $REPUID1`
|
RDATE1="find . -type f -exec stat --format '%Y :%y %n' '{}' \; | sort -nr | cut -d: -f2- | egrep -v 'gitInfo|.git|updateGitVersion|.o' | head -n 1"
|
||||||
AUTH1=`eval $AUTH1_1 $AUTH1_2`
|
|
||||||
AUTH2=`eval $AUTH2_1 $AUTH2_2`
|
|
||||||
REV=`eval $REV1 $REV2`
|
|
||||||
FOLDERREV=`eval $FOLDERREV1 $FOLDERREV2`
|
|
||||||
RDATE=`eval $RDATE1`
|
RDATE=`eval $RDATE1`
|
||||||
echo Path: slsDetectorsPackage/$WD $'\n'URL: ${GITREPO}/$SERVER $'\n'Repository Root: ${GITREPO} $'\n'Repsitory UUID: ${REPUID} $'\n'Revision: ${FOLDERREV} $'\n'Branch: ${BRANCH} $'\n'Last Changed Author: ${AUTH1}_${AUTH2} $'\n'Last Changed Rev: ${REV} $'\n'Last Changed Date: ${RDATE} > gitInfo.txt
|
NEWDATE=$(sed "s/-//g" <<< $RDATE | awk '{print $1;}')
|
||||||
cd ../../
|
NEWDATE=${NEWDATE/#/0x}
|
||||||
./genVersionHeader.sh $WD/gitInfo.txt $WD/$TMPFILE $WD/$INCLFILE
|
|
||||||
echo "Revision Updated"
|
|
||||||
cd $WD
|
|
||||||
|
|
||||||
|
|
||||||
|
#get old date from INCLFILE
|
||||||
|
OLDDATE=$(more $INCLFILE | grep '#define SVNDATE' | awk '{print $3}')
|
||||||
|
|
||||||
|
|
||||||
|
#update INCLFILE if changes
|
||||||
|
if [ "$OLDDATE" != "$NEWDATE" ]; then
|
||||||
|
echo Path: ${MAINDIR}/${SPECDIR} $'\n'URL: ${GITREPO} $'\n'Repository Root: ${GITREPO} $'\n'Repsitory UUID: ${REPUID} $'\n'Revision: ${FOLDERREV} $'\n'Branch: ${BRANCH} $'\n'Last Changed Author: ${AUTH1}_${AUTH2} $'\n'Last Changed Rev: ${REV} $'\n'Last Changed Date: ${RDATE} > gitInfo.txt
|
||||||
|
cd ../../
|
||||||
|
./genVersionHeader.sh $SPECDIR/gitInfo.txt $SPECDIR/$TMPFILE $SPECDIR/$INCLFILE
|
||||||
|
cd $WD
|
||||||
|
fi
|
@ -22,26 +22,26 @@ OBJS = $(SRCS:%.c=%.o)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
all: clean $(PROGS)
|
all: clean versioning $(PROGS)
|
||||||
|
|
||||||
test: clean jungfrauADCTEst
|
test: clean jungfrauADCTEst
|
||||||
|
|
||||||
boot: $(OBJS)
|
boot: $(OBJS)
|
||||||
|
|
||||||
|
versioning:
|
||||||
|
@echo `tput setaf 6; ./updateGitVersion.sh; tput sgr0;`
|
||||||
|
|
||||||
jungfrauDetectorServerTest: $(OBJS)
|
jungfrauDetectorServerTest: $(OBJS)
|
||||||
echo $(OBJS)
|
echo $(OBJS)
|
||||||
@echo `tput setaf 6; ./updateGitVersion.sh; tput sgr0;`
|
|
||||||
$(CC) $(CFLAGS) -o $@ $^ $(LDLIBS_$@) $(LDFLAGS_$@)
|
$(CC) $(CFLAGS) -o $@ $^ $(LDLIBS_$@) $(LDFLAGS_$@)
|
||||||
|
|
||||||
|
|
||||||
jungfrauDetectorServer: $(OBJS)
|
jungfrauDetectorServer: $(OBJS)
|
||||||
echo $(OBJS)
|
echo $(OBJS)
|
||||||
@echo `tput setaf 6; ./updateGitVersion.sh; tput sgr0;`
|
|
||||||
$(CC) $(CFLAGS) -o $@ $^ $(LDLIBS_$@) $(LDFLAGS_$@)
|
$(CC) $(CFLAGS) -o $@ $^ $(LDLIBS_$@) $(LDFLAGS_$@)
|
||||||
|
|
||||||
jungfrauADCTEst: $(OBJS)
|
jungfrauADCTEst: $(OBJS)
|
||||||
echo $(OBJS)
|
echo $(OBJS)
|
||||||
@echo `tput setaf 6; ./updateGitVersion.sh; tput sgr0;`
|
|
||||||
$(CC) $(CFLAGS) -o $@ $^ $(LDLIBS_$@) $(LDFLAGS_$@) -DTESTADC
|
$(CC) $(CFLAGS) -o $@ $^ $(LDLIBS_$@) $(LDFLAGS_$@) -DTESTADC
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,37 +1,31 @@
|
|||||||
SERVER=jctbDetectorServer
|
SERVER=jctbDetectorServer
|
||||||
|
MAINDIR=slsDetectorsPackage
|
||||||
|
SPECDIR=slsDetectorSoftware/$SERVER
|
||||||
TMPFILE=gitInfoMoenchTmp.h
|
TMPFILE=gitInfoMoenchTmp.h
|
||||||
INCLFILE=gitInfoMoench.h
|
INCLFILE=gitInfoMoench.h
|
||||||
|
|
||||||
WD=slsDetectorSoftware/$SERVER
|
|
||||||
|
|
||||||
GITREPO1='git remote -v'
|
#evaluate the variables
|
||||||
GITREPO2=" | grep \"fetch\" | cut -d' ' -f1"
|
EVALFILE=../../evalVersionVariables.sh
|
||||||
BRANCH1='git branch -v'
|
source $EVALFILE
|
||||||
BRANCH2=" | grep '*' | cut -d' ' -f2"
|
|
||||||
REPUID1='git log --pretty=format:"%H" -1'
|
|
||||||
AUTH1_1='git log --pretty=format:"%cn" -1'
|
|
||||||
AUTH1_2=" | cut -d' ' -f1"
|
|
||||||
AUTH2_1='git log --pretty=format:"%cn" -1'
|
|
||||||
AUTH2_2=" | cut -d' ' -f2"
|
|
||||||
FOLDERREV1='git log --oneline . ' #used for all the individual server folders
|
|
||||||
FOLDERREV2=" | wc -l" #used for all the individual server folders
|
|
||||||
REV1='git log --oneline '
|
|
||||||
REV2=" | wc -l"
|
|
||||||
RDATE1='git log --pretty=format:"%ci" -1'
|
|
||||||
|
|
||||||
GITREPO=`eval $GITREPO1 $GITREPO2`
|
|
||||||
BRANCH=`eval $BRANCH1 $BRANCH2`
|
#get modified date
|
||||||
REPUID=`eval $REPUID1`
|
#RDATE1='git log --pretty=format:"%ci" -1'
|
||||||
AUTH1=`eval $AUTH1_1 $AUTH1_2`
|
RDATE1="find . -type f -exec stat --format '%Y :%y %n' '{}' \; | sort -nr | cut -d: -f2- | egrep -v 'gitInfo|.git|updateGitVersion|.o' | head -n 1"
|
||||||
AUTH2=`eval $AUTH2_1 $AUTH2_2`
|
|
||||||
REV=`eval $REV1 $REV2`
|
|
||||||
FOLDERREV=`eval $FOLDERREV1 $FOLDERREV2`
|
|
||||||
RDATE=`eval $RDATE1`
|
RDATE=`eval $RDATE1`
|
||||||
echo Path: slsDetectorsPackage/$WD $'\n'URL: ${GITREPO}/$SERVER $'\n'Repository Root: ${GITREPO} $'\n'Repsitory UUID: ${REPUID} $'\n'Revision: ${FOLDERREV} $'\n'Branch: ${BRANCH} $'\n'Last Changed Author: ${AUTH1}_${AUTH2} $'\n'Last Changed Rev: ${REV} $'\n'Last Changed Date: ${RDATE} > gitInfo.txt
|
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}')
|
||||||
|
|
||||||
|
|
||||||
|
#update INCLFILE if changes
|
||||||
|
if [ "$OLDDATE" != "$NEWDATE" ]; then
|
||||||
|
echo Path: ${MAINDIR}/${SPECDIR} $'\n'URL: ${GITREPO} $'\n'Repository Root: ${GITREPO} $'\n'Repsitory UUID: ${REPUID} $'\n'Revision: ${FOLDERREV} $'\n'Branch: ${BRANCH} $'\n'Last Changed Author: ${AUTH1}_${AUTH2} $'\n'Last Changed Rev: ${REV} $'\n'Last Changed Date: ${RDATE} > gitInfo.txt
|
||||||
cd ../../
|
cd ../../
|
||||||
./genVersionHeader.sh $WD/gitInfo.txt $WD/$TMPFILE $WD/$INCLFILE
|
./genVersionHeader.sh $SPECDIR/gitInfo.txt $SPECDIR/$TMPFILE $SPECDIR/$INCLFILE
|
||||||
echo "Revision Updated"
|
|
||||||
cd $WD
|
cd $WD
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
@ -10,14 +10,15 @@ INSTMODE = 0777
|
|||||||
SRC_CLNT = communication_funcs.c slsDetectorServer.c slsDetectorServer_funcs.c slsDetectorFunctionList.c
|
SRC_CLNT = communication_funcs.c slsDetectorServer.c slsDetectorServer_funcs.c slsDetectorFunctionList.c
|
||||||
OBJS = $(SRC_CLNT:.c=.o)
|
OBJS = $(SRC_CLNT:.c=.o)
|
||||||
|
|
||||||
all: clean $(PROGS)
|
all: clean versioning $(PROGS)
|
||||||
|
|
||||||
boot: $(OBJS)
|
boot: $(OBJS)
|
||||||
|
|
||||||
|
versioning:
|
||||||
|
@echo `tput setaf 6; ./updateGitVersion.sh; tput sgr0;`
|
||||||
|
|
||||||
$(PROGS): $(OBJS)
|
$(PROGS): $(OBJS)
|
||||||
# echo $(OBJS)
|
# echo $(OBJS)
|
||||||
@echo `tput setaf 6; ./updateGitVersion.sh; tput sgr0;`
|
|
||||||
$(CC) $(CFLAGS) -c -o slsDetectorFunctionList.o slsDetectorFunctionList.c
|
|
||||||
mkdir -p $(DESTDIR)
|
mkdir -p $(DESTDIR)
|
||||||
$(CC) -o $@ $^ $(CFLAGS) $(LDLIBS)
|
$(CC) -o $@ $^ $(CFLAGS) $(LDLIBS)
|
||||||
mv $(PROGS) $(DESTDIR)
|
mv $(PROGS) $(DESTDIR)
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
Path: slsDetectorsPackage/slsDetectorSoftware/jungfrauDetectorServer
|
Path: slsDetectorsPackage/slsDetectorSoftware/jungfrauDetectorServer
|
||||||
URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git/jungfrauDetectorServer
|
URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||||
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||||
Repsitory UUID: ac8afb3a4dc53ac14f7034d281acc8f0a700ca8d
|
Repsitory UUID: 9f1b82c18ab0893d65bfadeb646b8ea244614632
|
||||||
Revision: 87
|
Revision: 88
|
||||||
Branch: developer
|
Branch: developer
|
||||||
Last Changed Author: Dhanya_Maliakal
|
Last Changed Author: Dhanya_Maliakal
|
||||||
Last Changed Rev: 1442
|
Last Changed Rev: 1443
|
||||||
Last Changed Date: 2017-07-03 17:44:52 +0200
|
Last Changed Date: 2017-07-10 10:40:23.000000002 +0200 ./Makefile
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
//#define SVNPATH ""
|
//#define SVNPATH ""
|
||||||
#define SVNURL "git@git.psi.ch:sls_detectors_software/sls_detector_software.git/jungfrauDetectorServer"
|
#define SVNURL "git@git.psi.ch:sls_detectors_software/sls_detector_software.git"
|
||||||
//#define SVNREPPATH ""
|
//#define SVNREPPATH ""
|
||||||
#define SVNREPUUID "ac8afb3a4dc53ac14f7034d281acc8f0a700ca8d"
|
#define SVNREPUUID "9f1b82c18ab0893d65bfadeb646b8ea244614632"
|
||||||
//#define SVNREV 0x1442
|
//#define SVNREV 0x1443
|
||||||
//#define SVNKIND ""
|
//#define SVNKIND ""
|
||||||
//#define SVNSCHED ""
|
//#define SVNSCHED ""
|
||||||
#define SVNAUTH "Dhanya_Maliakal"
|
#define SVNAUTH "Dhanya_Maliakal"
|
||||||
#define SVNREV 0x1442
|
#define SVNREV 0x1443
|
||||||
#define SVNDATE 0x20170703
|
#define SVNDATE 0x20170710
|
||||||
//
|
//
|
||||||
|
@ -1,34 +1,31 @@
|
|||||||
SERVER=jungfrauDetectorServer
|
SERVER=jungfrauDetectorServer
|
||||||
|
MAINDIR=slsDetectorsPackage
|
||||||
|
SPECDIR=slsDetectorSoftware/$SERVER
|
||||||
TMPFILE=gitInfoJungfrauTmp.h
|
TMPFILE=gitInfoJungfrauTmp.h
|
||||||
INCLFILE=gitInfoJungfrau.h
|
INCLFILE=gitInfoJungfrau.h
|
||||||
|
|
||||||
WD=slsDetectorSoftware/$SERVER
|
|
||||||
|
|
||||||
GITREPO1='git remote -v'
|
#evaluate the variables
|
||||||
GITREPO2=" | grep \"fetch\" | cut -d' ' -f1"
|
EVALFILE=../../evalVersionVariables.sh
|
||||||
BRANCH1='git branch -v'
|
source $EVALFILE
|
||||||
BRANCH2=" | grep '*' | cut -d' ' -f2"
|
|
||||||
REPUID1='git log --pretty=format:"%H" -1'
|
|
||||||
AUTH1_1='git log --pretty=format:"%cn" -1'
|
|
||||||
AUTH1_2=" | cut -d' ' -f1"
|
|
||||||
AUTH2_1='git log --pretty=format:"%cn" -1'
|
|
||||||
AUTH2_2=" | cut -d' ' -f2"
|
|
||||||
FOLDERREV1='git log --oneline . ' #used for all the individual server folders
|
|
||||||
FOLDERREV2=" | wc -l" #used for all the individual server folders
|
|
||||||
REV1='git log --oneline '
|
|
||||||
REV2=" | wc -l"
|
|
||||||
RDATE1='git log --pretty=format:"%ci" -1'
|
|
||||||
|
|
||||||
GITREPO=`eval $GITREPO1 $GITREPO2`
|
|
||||||
BRANCH=`eval $BRANCH1 $BRANCH2`
|
#get modified date
|
||||||
REPUID=`eval $REPUID1`
|
#RDATE1='git log --pretty=format:"%ci" -1'
|
||||||
AUTH1=`eval $AUTH1_1 $AUTH1_2`
|
RDATE1="find ../slsDetectorServer . -type f -exec stat --format '%Y :%y %n' '{}' \; | sort -nr | cut -d: -f2- | egrep -v 'gitInfo|bin|.git|updateGitVersion|.o' | head -n 1"
|
||||||
AUTH2=`eval $AUTH2_1 $AUTH2_2`
|
|
||||||
REV=`eval $REV1 $REV2`
|
|
||||||
FOLDERREV=`eval $FOLDERREV1 $FOLDERREV2`
|
|
||||||
RDATE=`eval $RDATE1`
|
RDATE=`eval $RDATE1`
|
||||||
echo Path: slsDetectorsPackage/$WD $'\n'URL: ${GITREPO}/$SERVER $'\n'Repository Root: ${GITREPO} $'\n'Repsitory UUID: ${REPUID} $'\n'Revision: ${FOLDERREV} $'\n'Branch: ${BRANCH} $'\n'Last Changed Author: ${AUTH1}_${AUTH2} $'\n'Last Changed Rev: ${REV} $'\n'Last Changed Date: ${RDATE} > gitInfo.txt
|
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}')
|
||||||
|
|
||||||
|
|
||||||
|
#update INCLFILE if changes
|
||||||
|
if [ "$OLDDATE" != "$NEWDATE" ]; then
|
||||||
|
echo Path: ${MAINDIR}/${SPECDIR} $'\n'URL: ${GITREPO} $'\n'Repository Root: ${GITREPO} $'\n'Repsitory UUID: ${REPUID} $'\n'Revision: ${FOLDERREV} $'\n'Branch: ${BRANCH} $'\n'Last Changed Author: ${AUTH1}_${AUTH2} $'\n'Last Changed Rev: ${REV} $'\n'Last Changed Date: ${RDATE} > gitInfo.txt
|
||||||
cd ../../
|
cd ../../
|
||||||
./genVersionHeader.sh $WD/gitInfo.txt $WD/$TMPFILE $WD/$INCLFILE
|
./genVersionHeader.sh $SPECDIR/gitInfo.txt $SPECDIR/$TMPFILE $SPECDIR/$INCLFILE
|
||||||
echo "Revision Updated"
|
|
||||||
cd $WD
|
cd $WD
|
||||||
|
fi
|
@ -21,13 +21,15 @@ OBJS = $(SRCS:%.c=%.o)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
all: clean $(PROGS)
|
all: clean versioning $(PROGS)
|
||||||
|
|
||||||
boot: $(OBJS)
|
boot: $(OBJS)
|
||||||
|
|
||||||
|
versioning:
|
||||||
|
@echo `tput setaf 6; ./updateGitVersion.sh; tput sgr0;`
|
||||||
|
|
||||||
$(PROGS): $(OBJS)
|
$(PROGS): $(OBJS)
|
||||||
echo $(OBJS)
|
echo $(OBJS)
|
||||||
@echo `tput setaf 6; ./updateGitVersion.sh; tput sgr0;`
|
|
||||||
$(CC) $(CFLAGS) -o $@ $^ $(LDLIBS_$@) $(LDFLAGS_$@)
|
$(CC) $(CFLAGS) -o $@ $^ $(LDLIBS_$@) $(LDFLAGS_$@)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
Path: slsDetectorsPackage/slsDetectorSoftware/moenchDetectorServer
|
Path: slsDetectorsPackage/slsDetectorSoftware/moenchDetectorServer
|
||||||
URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git/moenchDetectorServer
|
URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||||
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||||
Repsitory UUID: 8aceb5d4b0ca6bd95a11b53e7a799b463b92d51b
|
Repsitory UUID: 9f1b82c18ab0893d65bfadeb646b8ea244614632
|
||||||
Revision: 80
|
Revision: 83
|
||||||
Branch: developer
|
Branch: developer
|
||||||
Last Changed Author: Dhanya_Maliakal
|
Last Changed Author: Dhanya_Maliakal
|
||||||
Last Changed Rev: 334
|
Last Changed Rev: 1443
|
||||||
Last Changed Date: 2016-08-12 11:08:03 +0200
|
Last Changed Date: 2017-07-10 11:03:27.000000002 +0200 ./Makefile
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
//#define SVNPATH ""
|
//#define SVNPATH ""
|
||||||
#define SVNURL "git@git.psi.ch:sls_detectors_software/sls_detector_software.git/moenchDetectorServer"
|
#define SVNURL "git@git.psi.ch:sls_detectors_software/sls_detector_software.git"
|
||||||
//#define SVNREPPATH ""
|
//#define SVNREPPATH ""
|
||||||
#define SVNREPUUID "8aceb5d4b0ca6bd95a11b53e7a799b463b92d51b"
|
#define SVNREPUUID "9f1b82c18ab0893d65bfadeb646b8ea244614632"
|
||||||
//#define SVNREV 0x334
|
//#define SVNREV 0x1443
|
||||||
//#define SVNKIND ""
|
//#define SVNKIND ""
|
||||||
//#define SVNSCHED ""
|
//#define SVNSCHED ""
|
||||||
#define SVNAUTH "Dhanya_Maliakal"
|
#define SVNAUTH "Dhanya_Maliakal"
|
||||||
#define SVNREV 0x334
|
#define SVNREV 0x1443
|
||||||
#define SVNDATE 0x20160812
|
#define SVNDATE 0x20170710
|
||||||
//
|
//
|
||||||
|
@ -1,34 +1,31 @@
|
|||||||
SERVER=moenchDetectorServer
|
SERVER=moenchDetectorServer
|
||||||
|
MAINDIR=slsDetectorsPackage
|
||||||
|
SPECDIR=slsDetectorSoftware/$SERVER
|
||||||
TMPFILE=gitInfoMoenchTmp.h
|
TMPFILE=gitInfoMoenchTmp.h
|
||||||
INCLFILE=gitInfoMoench.h
|
INCLFILE=gitInfoMoench.h
|
||||||
|
|
||||||
WD=slsDetectorSoftware/$SERVER
|
|
||||||
|
|
||||||
GITREPO1='git remote -v'
|
#evaluate the variables
|
||||||
GITREPO2=" | grep \"fetch\" | cut -d' ' -f1"
|
EVALFILE=../../evalVersionVariables.sh
|
||||||
BRANCH1='git branch -v'
|
source $EVALFILE
|
||||||
BRANCH2=" | grep '*' | cut -d' ' -f2"
|
|
||||||
REPUID1='git log --pretty=format:"%H" -1'
|
|
||||||
AUTH1_1='git log --pretty=format:"%cn" -1'
|
|
||||||
AUTH1_2=" | cut -d' ' -f1"
|
|
||||||
AUTH2_1='git log --pretty=format:"%cn" -1'
|
|
||||||
AUTH2_2=" | cut -d' ' -f2"
|
|
||||||
FOLDERREV1='git log --oneline . ' #used for all the individual server folders
|
|
||||||
FOLDERREV2=" | wc -l" #used for all the individual server folders
|
|
||||||
REV1='git log --oneline '
|
|
||||||
REV2=" | wc -l"
|
|
||||||
RDATE1='git log --pretty=format:"%ci" -1'
|
|
||||||
|
|
||||||
GITREPO=`eval $GITREPO1 $GITREPO2`
|
|
||||||
BRANCH=`eval $BRANCH1 $BRANCH2`
|
#get modified date
|
||||||
REPUID=`eval $REPUID1`
|
#RDATE1='git log --pretty=format:"%ci" -1'
|
||||||
AUTH1=`eval $AUTH1_1 $AUTH1_2`
|
RDATE1="find . -type f -exec stat --format '%Y :%y %n' '{}' \; | sort -nr | cut -d: -f2- | egrep -v 'gitInfo|.git|updateGitVersion|.o' | head -n 1"
|
||||||
AUTH2=`eval $AUTH2_1 $AUTH2_2`
|
|
||||||
REV=`eval $REV1 $REV2`
|
|
||||||
FOLDERREV=`eval $FOLDERREV1 $FOLDERREV2`
|
|
||||||
RDATE=`eval $RDATE1`
|
RDATE=`eval $RDATE1`
|
||||||
echo Path: slsDetectorsPackage/$WD $'\n'URL: ${GITREPO}/$SERVER $'\n'Repository Root: ${GITREPO} $'\n'Repsitory UUID: ${REPUID} $'\n'Revision: ${FOLDERREV} $'\n'Branch: ${BRANCH} $'\n'Last Changed Author: ${AUTH1}_${AUTH2} $'\n'Last Changed Rev: ${REV} $'\n'Last Changed Date: ${RDATE} > gitInfo.txt
|
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}')
|
||||||
|
|
||||||
|
|
||||||
|
#update INCLFILE if changes
|
||||||
|
if [ "$OLDDATE" != "$NEWDATE" ]; then
|
||||||
|
echo Path: ${MAINDIR}/${SPECDIR} $'\n'URL: ${GITREPO} $'\n'Repository Root: ${GITREPO} $'\n'Repsitory UUID: ${REPUID} $'\n'Revision: ${FOLDERREV} $'\n'Branch: ${BRANCH} $'\n'Last Changed Author: ${AUTH1}_${AUTH2} $'\n'Last Changed Rev: ${REV} $'\n'Last Changed Date: ${RDATE} > gitInfo.txt
|
||||||
cd ../../
|
cd ../../
|
||||||
./genVersionHeader.sh $WD/gitInfo.txt $WD/$TMPFILE $WD/$INCLFILE
|
./genVersionHeader.sh $SPECDIR/gitInfo.txt $SPECDIR/$TMPFILE $SPECDIR/$INCLFILE
|
||||||
echo "Revision Updated"
|
|
||||||
cd $WD
|
cd $WD
|
||||||
|
fi
|
@ -21,11 +21,15 @@ CFLAGS+= -Wall -DC_ONLY -DMCB_FUNCS -DDACS_INT $(VFLAGS)
|
|||||||
|
|
||||||
LDLIBS+= -lm
|
LDLIBS+= -lm
|
||||||
|
|
||||||
mythen: clean $(PROGS)
|
mythen: clean versioning $(PROGS)
|
||||||
all: updateVersion $(PROGS)
|
all: versioning $(PROGS)
|
||||||
|
|
||||||
boot: $(OBJS)
|
boot: $(OBJS)
|
||||||
|
|
||||||
|
versioning:
|
||||||
|
@echo `tput setaf 6; ./updateGitVersion.sh; tput sgr0;`
|
||||||
|
|
||||||
|
|
||||||
$(PROGS): $(OBJS)
|
$(PROGS): $(OBJS)
|
||||||
echo $(OBJS)
|
echo $(OBJS)
|
||||||
$(CC) $(LDFLAGS) $^ $(LDLIBS) $(CFLAGS) -o $@
|
$(CC) $(LDFLAGS) $^ $(LDLIBS) $(CFLAGS) -o $@
|
||||||
@ -40,6 +44,3 @@ clean:
|
|||||||
depend:
|
depend:
|
||||||
makedepend -Y -- $(CFLAGS) -- $(SRCS) 2>/dev/null
|
makedepend -Y -- $(CFLAGS) -- $(SRCS) 2>/dev/null
|
||||||
|
|
||||||
updateVersion:
|
|
||||||
./updateGitVersion.sh
|
|
||||||
|
|
@ -18,7 +18,7 @@ CFLAGS+= -Wall -DC_ONLY -DVERBOSE
|
|||||||
|
|
||||||
LDLIBS+= -lm
|
LDLIBS+= -lm
|
||||||
|
|
||||||
all: updateVersion $(PROGS)
|
all: versioning $(PROGS)
|
||||||
|
|
||||||
boot: $(OBJS)
|
boot: $(OBJS)
|
||||||
|
|
||||||
@ -36,6 +36,5 @@ clean:
|
|||||||
depend:
|
depend:
|
||||||
makedepend -Y -- $(CFLAGS) -- $(SRCS) 2>/dev/null
|
makedepend -Y -- $(CFLAGS) -- $(SRCS) 2>/dev/null
|
||||||
|
|
||||||
updateVersion:
|
versioning:
|
||||||
./updateGitVersion.sh
|
@echo `tput setaf 6; ./updateGitVersion.sh; tput sgr0;`
|
||||||
|
|
@ -21,8 +21,8 @@ CFLAGS+= -Wall -DC_ONLY -DMCB_FUNCS -DVERBOSE -DVERYVERBOSE -DPICASSOD
|
|||||||
LDLIBS+= -lm
|
LDLIBS+= -lm
|
||||||
|
|
||||||
picasso: $(PICASSO)
|
picasso: $(PICASSO)
|
||||||
mythen: $(PROGS)
|
mythen: versioning $(PROGS)
|
||||||
all: $(PROGS) $(PICASSO)
|
all: versioning $(PROGS) $(PICASSO)
|
||||||
|
|
||||||
boot: $(OBJS)
|
boot: $(OBJS)
|
||||||
|
|
||||||
@ -44,3 +44,6 @@ clean:
|
|||||||
|
|
||||||
depend:
|
depend:
|
||||||
makedepend -Y -- $(CFLAGS) -- $(SRCS) 2>/dev/null
|
makedepend -Y -- $(CFLAGS) -- $(SRCS) 2>/dev/null
|
||||||
|
|
||||||
|
versioning:
|
||||||
|
@echo `tput setaf 6; ./updateGitVersion.sh; tput sgr0;`
|
@ -1,37 +1,31 @@
|
|||||||
SERVER=mythenDetectorServer
|
SERVER=mythenDetectorServer
|
||||||
|
MAINDIR=slsDetectorsPackage
|
||||||
|
SPECDIR=slsDetectorSoftware/$SERVER
|
||||||
TMPFILE=gitInfoMythenTmp.h
|
TMPFILE=gitInfoMythenTmp.h
|
||||||
INCLFILE=gitInfoMythen.h
|
INCLFILE=gitInfoMythen.h
|
||||||
|
|
||||||
WD=slsDetectorSoftware/$SERVER
|
|
||||||
|
|
||||||
GITREPO1='git remote -v'
|
#evaluate the variables
|
||||||
GITREPO2=" | grep \"fetch\" | cut -d' ' -f1"
|
EVALFILE=../../evalVersionVariables.sh
|
||||||
BRANCH1='git branch -v'
|
source $EVALFILE
|
||||||
BRANCH2=" | grep '*' | cut -d' ' -f2"
|
|
||||||
REPUID1='git log --pretty=format:"%H" -1'
|
|
||||||
AUTH1_1='git log --pretty=format:"%cn" -1'
|
|
||||||
AUTH1_2=" | cut -d' ' -f1"
|
|
||||||
AUTH2_1='git log --pretty=format:"%cn" -1'
|
|
||||||
AUTH2_2=" | cut -d' ' -f2"
|
|
||||||
FOLDERREV1='git log --oneline . ' #used for all the individual server folders
|
|
||||||
FOLDERREV2=" | wc -l" #used for all the individual server folders
|
|
||||||
REV1='git log --oneline '
|
|
||||||
REV2=" | wc -l"
|
|
||||||
RDATE1='git log --pretty=format:"%ci" -1'
|
|
||||||
|
|
||||||
GITREPO=`eval $GITREPO1 $GITREPO2`
|
|
||||||
BRANCH=`eval $BRANCH1 $BRANCH2`
|
#get modified date
|
||||||
REPUID=`eval $REPUID1`
|
#RDATE1='git log --pretty=format:"%ci" -1'
|
||||||
AUTH1=`eval $AUTH1_1 $AUTH1_2`
|
RDATE1="find ../slsDetectorServer . -type f -exec stat --format '%Y :%y %n' '{}' \; | sort -nr | cut -d: -f2- | egrep -v 'gitInfo|bin|.git|updateGitVersion|.o' | head -n 1"
|
||||||
AUTH2=`eval $AUTH2_1 $AUTH2_2`
|
|
||||||
REV=`eval $REV1 $REV2`
|
|
||||||
FOLDERREV=`eval $FOLDERREV1 $FOLDERREV2`
|
|
||||||
RDATE=`eval $RDATE1`
|
RDATE=`eval $RDATE1`
|
||||||
echo Path: slsDetectorsPackage/$WD $'\n'URL: ${GITREPO}/$SERVER $'\n'Repository Root: ${GITREPO} $'\n'Repsitory UUID: ${REPUID} $'\n'Revision: ${FOLDERREV} $'\n'Branch: ${BRANCH} $'\n'Last Changed Author: ${AUTH1}_${AUTH2} $'\n'Last Changed Rev: ${REV} $'\n'Last Changed Date: ${RDATE} > gitInfo.txt
|
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}')
|
||||||
|
|
||||||
|
|
||||||
|
#update INCLFILE if changes
|
||||||
|
if [ "$OLDDATE" != "$NEWDATE" ]; then
|
||||||
|
echo Path: ${MAINDIR}/${SPECDIR} $'\n'URL: ${GITREPO} $'\n'Repository Root: ${GITREPO} $'\n'Repsitory UUID: ${REPUID} $'\n'Revision: ${FOLDERREV} $'\n'Branch: ${BRANCH} $'\n'Last Changed Author: ${AUTH1}_${AUTH2} $'\n'Last Changed Rev: ${REV} $'\n'Last Changed Date: ${RDATE} > gitInfo.txt
|
||||||
cd ../../
|
cd ../../
|
||||||
./genVersionHeader.sh $WD/gitInfo.txt $WD/$TMPFILE $WD/$INCLFILE
|
./genVersionHeader.sh $SPECDIR/gitInfo.txt $SPECDIR/$TMPFILE $SPECDIR/$INCLFILE
|
||||||
echo "Revision Updated"
|
|
||||||
cd $WD
|
cd $WD
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
|||||||
//#define SVNPATH ""
|
//#define SVNPATH ""
|
||||||
#define SVNURLLIB "git@git.psi.ch:sls_detectors_software/sls_detector_software.git"
|
#define SVNURLLIB "git@git.psi.ch:sls_detectors_software/sls_detector_software.git"
|
||||||
//#define SVNREPPATH ""
|
//#define SVNREPPATH ""
|
||||||
#define SVNREPUUIDLIB "79271ea7e3f5ac7113582e694b30b71a64d18844"
|
#define SVNREPUUIDLIB "9f1b82c18ab0893d65bfadeb646b8ea244614632"
|
||||||
//#define SVNREV 0x1441
|
//#define SVNREV 0x1443
|
||||||
//#define SVNKIND ""
|
//#define SVNKIND ""
|
||||||
//#define SVNSCHED ""
|
//#define SVNSCHED ""
|
||||||
#define SVNAUTHLIB "Dhanya_Maliakal"
|
#define SVNAUTHLIB "Dhanya_Maliakal"
|
||||||
#define SVNREVLIB 0x1441
|
#define SVNREVLIB 0x1443
|
||||||
#define SVNDATELIB 0x20170703
|
#define SVNDATELIB 0x20170710
|
||||||
//
|
//
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
|
|
||||||
// Global variables
|
// Global variables
|
||||||
|
|
||||||
extern int lockStatus;
|
extern int lockStatus;
|
||||||
extern char lastClientIP[INET_ADDRSTRLEN];
|
extern char lastClientIP[INET_ADDRSTRLEN];
|
||||||
extern char thisClientIP[INET_ADDRSTRLEN];
|
extern char thisClientIP[INET_ADDRSTRLEN];
|
||||||
|
@ -4,34 +4,25 @@ TMPFILE=slsDetector/gitInfoLibTmp.h
|
|||||||
INCLFILE=slsDetector/gitInfoLib.h
|
INCLFILE=slsDetector/gitInfoLib.h
|
||||||
WD=$PWD
|
WD=$PWD
|
||||||
|
|
||||||
GITREPO1='git remote -v'
|
#evaluate the variables
|
||||||
GITREPO2=" | grep \"fetch\" | cut -d' ' -f1"
|
EVALFILE=../evalVersionVariables.sh
|
||||||
BRANCH1='git branch -v'
|
source $EVALFILE
|
||||||
BRANCH2=" | grep '*' | cut -d' ' -f2"
|
|
||||||
REPUID1='git log --pretty=format:"%H" -1'
|
|
||||||
AUTH1_1='git log --pretty=format:"%cn" -1'
|
|
||||||
AUTH1_2=" | cut -d' ' -f1"
|
|
||||||
AUTH2_1='git log --pretty=format:"%cn" -1'
|
|
||||||
AUTH2_2=" | cut -d' ' -f2"
|
|
||||||
FOLDERREV1='git log --oneline . ' #used for all the individual server folders
|
|
||||||
FOLDERREV2=" | wc -l" #used for all the individual server folders
|
|
||||||
REV1='git log --oneline '
|
|
||||||
REV2=" | wc -l"
|
|
||||||
RDATE1='git log --pretty=format:"%ci" -1'
|
|
||||||
|
|
||||||
GITREPO=`eval $GITREPO1 $GITREPO2`
|
#get modified date
|
||||||
BRANCH=`eval $BRANCH1 $BRANCH2`
|
#RDATE1='git log --pretty=format:"%ci" -1'
|
||||||
REPUID=`eval $REPUID1`
|
RDATE1="find . -type f -exec stat --format '%Y :%y %n' '{}' \; | sort -nr | cut -d: -f2- | egrep -v 'gitInfo|build|.git|updateGitVersion' | head -n 1"
|
||||||
AUTH1=`eval $AUTH1_1 $AUTH1_2`
|
|
||||||
AUTH2=`eval $AUTH2_1 $AUTH2_2`
|
|
||||||
REV=`eval $REV1 $REV2`
|
|
||||||
FOLDERREV=`eval $FOLDERREV1 $FOLDERREV2`
|
|
||||||
RDATE=`eval $RDATE1`
|
RDATE=`eval $RDATE1`
|
||||||
|
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}')
|
||||||
|
|
||||||
|
|
||||||
|
#update INCLFILE if changes
|
||||||
|
if [ "$OLDDATE" != "$NEWDATE" ]; then
|
||||||
echo Path: ${MAINDIR}/${SPECDIR} $'\n'URL: ${GITREPO} $'\n'Repository Root: ${GITREPO} $'\n'Repsitory UUID: ${REPUID} $'\n'Revision: ${FOLDERREV} $'\n'Branch: ${BRANCH} $'\n'Last Changed Author: ${AUTH1}_${AUTH2} $'\n'Last Changed Rev: ${REV} $'\n'Last Changed Date: ${RDATE} > gitInfo.txt
|
echo Path: ${MAINDIR}/${SPECDIR} $'\n'URL: ${GITREPO} $'\n'Repository Root: ${GITREPO} $'\n'Repsitory UUID: ${REPUID} $'\n'Revision: ${FOLDERREV} $'\n'Branch: ${BRANCH} $'\n'Last Changed Author: ${AUTH1}_${AUTH2} $'\n'Last Changed Rev: ${REV} $'\n'Last Changed Date: ${RDATE} > gitInfo.txt
|
||||||
cd ..
|
cd ..
|
||||||
./genVersionHeader.sh $SPECDIR/gitInfo.txt $SPECDIR/$TMPFILE $SPECDIR/$INCLFILE
|
./genVersionHeader.sh $SPECDIR/gitInfo.txt $SPECDIR/$TMPFILE $SPECDIR/$INCLFILE
|
||||||
echo "Revision Updated"
|
|
||||||
cd $WD
|
cd $WD
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user