Use short hash for continuous version.

This commit is contained in:
Leonardo Zide 2019-03-17 12:21:33 -07:00
parent 7c267c91d3
commit c68ce5fff8
2 changed files with 3 additions and 3 deletions

View file

@ -61,12 +61,12 @@ isEmpty(QMAKE_LRELEASE) {
TRAVIS_COMMIT = $$(TRAVIS_COMMIT)
!isEmpty(TRAVIS_COMMIT) {
DEFINES += "LC_CONTINUOUS_BUILD=$$TRAVIS_COMMIT"
DEFINES += "LC_CONTINUOUS_BUILD=$$system(git rev-parse --short HEAD)"
}
APPVEYOR_REPO_COMMIT = $$(APPVEYOR_REPO_COMMIT)
!isEmpty(APPVEYOR_REPO_COMMIT) {
DEFINES += "LC_CONTINUOUS_BUILD=$$APPVEYOR_REPO_COMMIT"
DEFINES += "LC_CONTINUOUS_BUILD=$$system(git rev-parse --short HEAD)"
}
TSFILES = resources/leocad_fr.ts resources/leocad_pt.ts resources/leocad_de.ts

View file

@ -12,7 +12,7 @@ lcQAboutDialog::lcQAboutDialog(QWidget *parent) :
ui->setupUi(this);
#ifdef LC_CONTINUOUS_BUILD
ui->version->setText(tr("LeoCAD Continuous Build\nfrom commit %1").arg(QString::fromLatin1(LC_CONTINUOUS_BUILD)));
ui->version->setText(tr("LeoCAD Continuous Build\nfrom commit %1").arg(QString::fromLatin1(QT_STRINGIFY(LC_CONTINUOUS_BUILD))));
#else
ui->version->setText(tr("LeoCAD Version %1").arg(QString::fromLatin1(LC_VERSION_TEXT)));
#endif