Added switch to get git hash and branch name
This commit is contained in:
13
qcma.pro
13
qcma.pro
@@ -90,13 +90,16 @@ TRANSLATIONS += \
|
|||||||
|
|
||||||
VERSION = \\\"'0.2.5'\\\"
|
VERSION = \\\"'0.2.5'\\\"
|
||||||
|
|
||||||
unix {
|
|
||||||
DEFINES += "BUILD_HASH=\"\\\"$$system(git rev-parse --short HEAD)\\\"\""
|
|
||||||
DEFINES += "BUILD_BRANCH=\"\\\"$$system(git rev-parse --abbrev-ref HEAD)\\\"\""
|
|
||||||
}
|
|
||||||
|
|
||||||
DEFINES += "QCMA_VER=$${VERSION}"
|
DEFINES += "QCMA_VER=$${VERSION}"
|
||||||
|
|
||||||
|
GET_HASHES {
|
||||||
|
message("Retrieving git hashes")
|
||||||
|
unix {
|
||||||
|
DEFINES += "QCMA_BUILD_HASH=\"\\\"$$system(git rev-parse --short HEAD)\\\"\""
|
||||||
|
DEFINES += "QCMA_BUILD_BRANCH=\"\\\"$$system(git rev-parse --abbrev-ref HEAD)\\\"\""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
unix {
|
unix {
|
||||||
isEmpty(PREFIX) {
|
isEmpty(PREFIX) {
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
|
@@ -134,7 +134,7 @@ void MainWidget::showAboutDialog()
|
|||||||
|
|
||||||
about.setText(QString("QCMA ") + QCMA_VER);
|
about.setText(QString("QCMA ") + QCMA_VER);
|
||||||
about.setWindowTitle(tr("About QCMA"));
|
about.setWindowTitle(tr("About QCMA"));
|
||||||
#ifndef BUILD_HASH
|
#ifndef QCMA_BUILD_HASH
|
||||||
about.setInformativeText(tr("Copyright (C) 2013 Codestation") + "\n");
|
about.setInformativeText(tr("Copyright (C) 2013 Codestation") + "\n");
|
||||||
#else
|
#else
|
||||||
about.setInformativeText(tr("Copyright (C) 2013 Codestation\n\nbuild hash: %1\nbuild branch: %2").arg(BUILD_HASH).arg(BUILD_BRANCH));
|
about.setInformativeText(tr("Copyright (C) 2013 Codestation\n\nbuild hash: %1\nbuild branch: %2").arg(BUILD_HASH).arg(BUILD_BRANCH));
|
||||||
|
Reference in New Issue
Block a user