mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-12 07:30:03 +02:00
added updateversion into makefile while compiling
This commit is contained in:
parent
22796d0d27
commit
3515951bb8
@ -29,7 +29,7 @@ INCLUDES ?= $(LIBRARYDIR)/commonFiles -I$(LIBRARYRXRDIR)/MySocketTCP -I$(LIBRA
|
|||||||
.PHONY: all lib clean mm doc htmldoc guiclient
|
.PHONY: all lib clean mm doc htmldoc guiclient
|
||||||
|
|
||||||
|
|
||||||
all: lib $(PROG) Makefile.gui guiclient
|
all: lib updateVersion $(PROG) Makefile.gui guiclient
|
||||||
|
|
||||||
lib:
|
lib:
|
||||||
cd ../ && $(MAKE) lib
|
cd ../ && $(MAKE) lib
|
||||||
@ -57,3 +57,6 @@ $(PROG): Makefile.gui $(DIR)
|
|||||||
guiclient:
|
guiclient:
|
||||||
echo $(WD)
|
echo $(WD)
|
||||||
cd client && $(MAKE) DESTDIR=$(DESTDIR)
|
cd client && $(MAKE) DESTDIR=$(DESTDIR)
|
||||||
|
|
||||||
|
updateVersion:
|
||||||
|
./updateGitVersion.sh
|
||||||
|
@ -62,6 +62,7 @@ INCLUDEPATH = \
|
|||||||
$(QWTDIR)/src\
|
$(QWTDIR)/src\
|
||||||
$(QWT3D)/include\
|
$(QWT3D)/include\
|
||||||
slsDetectorPlotting/include\
|
slsDetectorPlotting/include\
|
||||||
|
../slsReceiverSoftware/include\
|
||||||
include\
|
include\
|
||||||
forms/include\
|
forms/include\
|
||||||
/usr/include/qwt\ #these are not included for standard installations, also bin path should include qt4 bin, not qt3 bin
|
/usr/include/qwt\ #these are not included for standard installations, also bin path should include qt4 bin, not qt3 bin
|
||||||
@ -128,6 +129,7 @@ HEADERS = \
|
|||||||
include/qTabMessages.h\
|
include/qTabMessages.h\
|
||||||
include/gitInfoGui.h\
|
include/gitInfoGui.h\
|
||||||
../slsDetectorSoftware/commonFiles/sls_detector_defs.h\
|
../slsDetectorSoftware/commonFiles/sls_detector_defs.h\
|
||||||
|
../slsReceiverSoftware/include/sls_receiver_defs.h\
|
||||||
include/qServer.h
|
include/qServer.h
|
||||||
|
|
||||||
|
|
||||||
|
35
slsDetectorGui/updateGitVersion.sh
Executable file
35
slsDetectorGui/updateGitVersion.sh
Executable file
@ -0,0 +1,35 @@
|
|||||||
|
MAINDIR=slsDetectorsPackage
|
||||||
|
SPECDIR=slsDetectorGui
|
||||||
|
TMPFILE=gitInfoGuiTmp.h
|
||||||
|
INCLFILE=gitInfoGui.h
|
||||||
|
WD=$PWD
|
||||||
|
|
||||||
|
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`
|
||||||
|
BRANCH=`eval $BRANCH1 $BRANCH2`
|
||||||
|
REPUID=`eval $REPUID1`
|
||||||
|
AUTH1=`eval $AUTH1_1 $AUTH1_2`
|
||||||
|
AUTH2=`eval $AUTH2_1 $AUTH2_2`
|
||||||
|
REV=`eval $REV1 $REV2`
|
||||||
|
FOLDERREV=`eval $FOLDERREV1 $FOLDERREV2`
|
||||||
|
RDATE=`eval $RDATE1`
|
||||||
|
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 $WD
|
||||||
|
./genVersionHeader.sh $SPECDIR/gitInfo.txt $SPECDIR/$TMPFILE $SPECDIR/$INCLFILE
|
||||||
|
echo "Revision Updated"
|
||||||
|
cd $WD
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user