diff options
author | 2022-06-24 12:27:54 +0200 | |
---|---|---|
committer | 2022-06-24 15:57:54 +0530 | |
commit | 91d0cf1138ca52d4208aad49a753122b231d8a01 (patch) | |
tree | d082cfdf98cfe69d4f407bdc591ef3bd1205f7ad /src | |
parent | 200576754474cb02238faf3fef48e94fe3035eef (diff) | |
download | whatsie-91d0cf1138ca52d4208aad49a753122b231d8a01.tar.gz whatsie-91d0cf1138ca52d4208aad49a753122b231d8a01.zip |
chore(qmake): avoid error message when .git folder is missing (close #49) (#52)
Diffstat (limited to 'src')
-rw-r--r-- | src/WhatsApp.pro | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/WhatsApp.pro b/src/WhatsApp.pro index 64342d0..8081769 100644 --- a/src/WhatsApp.pro +++ b/src/WhatsApp.pro @@ -39,10 +39,13 @@ DEFINES += QT_DEPRECATED_WARNINGS CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG_OUTPUT # Define git info -GIT_HASH="\\\"$$system(git -C \""$$_PRO_FILE_PWD_"\" rev-parse --short HEAD)\\\"" -GIT_BRANCH="\\\"$$system(git -C \""$$_PRO_FILE_PWD_"\" rev-parse --abbrev-ref HEAD)\\\"" -BUILD_TIMESTAMP="\\\"$$system(date -u +\""%Y-%m-%dT%H:%M:%SUTC\"")\\\"" -DEFINES += GIT_HASH=$$GIT_HASH GIT_BRANCH=$$GIT_BRANCH BUILD_TIMESTAMP=$$BUILD_TIMESTAMP +exists(${QMAKE_FILE_PATH}/../.git) { + GIT_HASH="\\\"$$system(git -C \""$$_PRO_FILE_PWD_"\" rev-parse --short HEAD)\\\"" + GIT_BRANCH="\\\"$$system(git -C \""$$_PRO_FILE_PWD_"\" rev-parse --abbrev-ref HEAD)\\\"" + BUILD_TIMESTAMP="\\\"$$system(date -u +\""%Y-%m-%dT%H:%M:%SUTC\"")\\\"" + DEFINES += GIT_HASH=$$GIT_HASH GIT_BRANCH=$$GIT_BRANCH BUILD_TIMESTAMP=$$BUILD_TIMESTAMP +} + # Set program version VERSION = 4.4 |