Use git info to generate version number

This commit is contained in:
Roy Qu 2024-02-20 13:12:46 +08:00
parent 625475fabd
commit 2c26f9aaa1
1 changed files with 4 additions and 2 deletions

View File

@ -17,7 +17,9 @@ APP_NAME = RedPandaCPP
APP_VERSION = 2.26 APP_VERSION = 2.26
TEST_VERSION = beta2 # TEST_VERSION = beta2
TEST_VERSION = $$system(git rev-list HEAD --count)
contains(QMAKE_HOST.arch, x86_64):{ contains(QMAKE_HOST.arch, x86_64):{
DEFINES += ARCH_X86_64=1 DEFINES += ARCH_X86_64=1
} else: { } else: {
@ -57,7 +59,7 @@ DEFINES += APP_NAME=\\\"$${APP_NAME}\\\"
isEmpty(TEST_VERSION) { isEmpty(TEST_VERSION) {
DEFINES += REDPANDA_CPP_VERSION=\\\"$${APP_VERSION}\\\" DEFINES += REDPANDA_CPP_VERSION=\\\"$${APP_VERSION}\\\"
} else { } else {
DEFINES += REDPANDA_CPP_VERSION=\\\"$${APP_VERSION}-$${TEST_VERSION}\\\" DEFINES += REDPANDA_CPP_VERSION=\\\"$${APP_VERSION}.$${TEST_VERSION}\\\"
} }
win32 { win32 {
_WINDOWS_PREFER_OPENCONSOLE = $$(WINDOWS_PREFER_OPENCONSOLE) _WINDOWS_PREFER_OPENCONSOLE = $$(WINDOWS_PREFER_OPENCONSOLE)