define git commnds only for linux
This commit is contained in:
parent
fc2abd3e89
commit
f9dfc2b5e7
@ -21,14 +21,15 @@ INCLUDEPATH += ../include
|
|||||||
win32 {
|
win32 {
|
||||||
BUILD_DATE=$$system("date /t")
|
BUILD_DATE=$$system("date /t")
|
||||||
BUILD_TIME=$$system("time /t")
|
BUILD_TIME=$$system("time /t")
|
||||||
|
GIT_COMMIT=""
|
||||||
|
EXTENDED_VERSION=""
|
||||||
} else {
|
} else {
|
||||||
BUILD_DATE=$$system("date +%d-%m-%y")
|
BUILD_DATE=$$system("date +%d-%m-%y")
|
||||||
BUILD_TIME=$$system("date +%H:%M:%S")
|
BUILD_TIME=$$system("date +%H:%M:%S")
|
||||||
|
GIT_COMMIT=$$system("git log -1 --format=oneline | cut -d' ' -f1")
|
||||||
|
EXTENDED_VERSION="$${VERSION}-$${GIT_COMMIT}"
|
||||||
}
|
}
|
||||||
|
|
||||||
GIT_COMMIT=$$system("git log -1 --format=oneline | cut -d' ' -f1")
|
|
||||||
|
|
||||||
EXTENDED_VERSION="$${VERSION}-$${GIT_COMMIT}"
|
|
||||||
|
|
||||||
DEFINES+=APP_VERSION=\\\"$$VERSION\\\"
|
DEFINES+=APP_VERSION=\\\"$$VERSION\\\"
|
||||||
DEFINES+=APP_BUILD_DATE=\\\"$$BUILD_DATE\\\"
|
DEFINES+=APP_BUILD_DATE=\\\"$$BUILD_DATE\\\"
|
||||||
|
@ -25,15 +25,16 @@ INCLUDEPATH += ../include
|
|||||||
win32 {
|
win32 {
|
||||||
BUILD_DATE=$$system("date /t")
|
BUILD_DATE=$$system("date /t")
|
||||||
BUILD_TIME=$$system("time /t")
|
BUILD_TIME=$$system("time /t")
|
||||||
|
GIT_COMMIT=""
|
||||||
|
EXTENDED_VERSION=""
|
||||||
} else {
|
} else {
|
||||||
BUILD_DATE=$$system("date +%d-%m-%y")
|
BUILD_DATE=$$system("date +%d-%m-%y")
|
||||||
BUILD_TIME=$$system("date +%H:%M:%S")
|
BUILD_TIME=$$system("date +%H:%M:%S")
|
||||||
|
|
||||||
|
GIT_COMMIT=$$system("git log -1 --format=oneline | cut -d' ' -f1")
|
||||||
|
EXTENDED_VERSION="$${VERSION}-$${GIT_COMMIT}"
|
||||||
}
|
}
|
||||||
|
|
||||||
GIT_COMMIT=$$system("git log -1 --format=oneline | cut -d' ' -f1")
|
|
||||||
|
|
||||||
EXTENDED_VERSION="$${VERSION}-$${GIT_COMMIT}"
|
|
||||||
|
|
||||||
DEFINES+=APP_VERSION=\\\"$$VERSION\\\"
|
DEFINES+=APP_VERSION=\\\"$$VERSION\\\"
|
||||||
DEFINES+=APP_BUILD_DATE=\\\"$$BUILD_DATE\\\"
|
DEFINES+=APP_BUILD_DATE=\\\"$$BUILD_DATE\\\"
|
||||||
DEFINES+=APP_BUILD_TIME=\\\"$$BUILD_TIME\\\"
|
DEFINES+=APP_BUILD_TIME=\\\"$$BUILD_TIME\\\"
|
||||||
|
Loading…
Reference in New Issue
Block a user