shared: shared.pro: Add git commit id to build

This commit is contained in:
Albert S. 2022-05-31 18:42:20 +02:00
parent 3f85f214e3
commit db029dd915
2 ha cambiato i file con 7 aggiunte e 1 eliminazioni

Vedi File

@ -205,5 +205,6 @@ bool Common::isTextFile(QFileInfo fileInfo)
QString Common::versionText() QString Common::versionText()
{ {
QString commitid = GIT_COMMIT_ID; QString commitid = GIT_COMMIT_ID;
return commitid + " built " + __DATE__ + " " + __TIME__; QString tag = GIT_TAG;
return tag + " (" + commitid + ") built " + __DATE__ + " " + __TIME__;
} }

Vedi File

@ -16,12 +16,17 @@ CONFIG += c++17
INCLUDEPATH += $$PWD/../sandbox/exile.h/ INCLUDEPATH += $$PWD/../sandbox/exile.h/
INCLUDEPATH += /usr/include/poppler/qt5/ /usr/include/quazip5 INCLUDEPATH += /usr/include/poppler/qt5/ /usr/include/quazip5
# The following define makes your compiler emit warnings if you use # The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings # any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the # depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it. # deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS DEFINES += QT_DEPRECATED_WARNINGS
DEFINES += GIT_COMMIT_ID="\\\"$(shell git rev-parse --short HEAD)\\\""
DEFINES += GIT_TAG="\\\"$(shell git describe --tags HEAD)\\\""
# You can also make your code fail to compile if you use deprecated APIs. # You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line. # In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt. # You can also select to disable deprecated APIs only up to a certain version of Qt.