Add alternative option where to read the installer-framework sha1

The "--version" uses the sha1 of the git checkout of the
installer-framework.

This works when making the build from git checkout.

For Coin (continuous integration) the installer-framework builds are
made from stored src packages where the .git directory is not present.

In this case read the sha1 from the .tag instead which is present in
the Coin produced src packages.

Change-Id: Ic6387c844699f4410c043a4df84727bb5c1108ae
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
This commit is contained in:
Iikka Eklund 2015-12-30 13:02:03 +02:00
parent 21a9aa9f13
commit 7ff35d7b68

View File

@ -111,7 +111,15 @@ CONFIG(static, static|shared) {
}
CONFIG += depend_includepath no_private_qt_headers_warning c++11
exists(".git") {
GIT_SHA1 = $$system(git rev-list --abbrev-commit -n1 HEAD)
}
isEmpty(GIT_SHA1) {
# Attempt to read the sha1 from alternative location
GIT_SHA1=\"$$cat(.tag)\"
}
DEFINES += QT_NO_CAST_FROM_ASCII QT_USE_QSTRINGBUILDER "_GIT_SHA1_=$$GIT_SHA1" \
IFW_VERSION_STR=$$IFW_VERSION_STR IFW_VERSION=$$IFW_VERSION
DEFINES += IFW_REPOSITORY_FORMAT_VERSION=$$IFW_REPOSITORY_FORMAT_VERSION