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

This commit is contained in:
Albert S. 2022-05-31 18:42:20 +02:00
rodzic 3f85f214e3
commit db029dd915
2 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

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

Wyświetl plik

@ -16,12 +16,17 @@ CONFIG += c++17
INCLUDEPATH += $$PWD/../sandbox/exile.h/
INCLUDEPATH += /usr/include/poppler/qt5/ /usr/include/quazip5
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
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.
# 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.