Browse Source

"Fancy" version statement (qmake part)

After some highly annoying and time consuming tinkering with quotes and
escaping, the embedding of versioning data seems to work as intended
now.
master
TheAssassin 7 years ago
parent
commit
b3d31bbc84
  1. 16
      tools/linuxdeployqt/linuxdeployqt.pro

16
tools/linuxdeployqt/linuxdeployqt.pro

@ -15,3 +15,19 @@ SOURCES += main.cpp \
shared.cpp
DEFINES -= QT_USE_QSTRINGBUILDER #leads to compile errors if not disabled
# versioning
# don't break the quotes -- at the moment, the shell commands are injected into the Makefile to have them run on every
# build and not during configure time
DEFINES += LINUXDEPLOYQT_GIT_COMMIT="'\"$(shell git rev-parse --short HEAD)\"'"
DEFINES += BUILD_DATE="'\"$(shell env LC_ALL=C date -u '+%Y-%m-%d %H:%M:%S %Z')\"'"
equals($$(TRAVIS_BUILD_NUMBER), "") {
DEFINES += BUILD_NUMBER="'\"<local dev build>\"'"
} else {
DEFINES += BUILD_NUMBER="'\"$$(TRAVIS_BUILD_NUMBER)\"'"
}
DEFINES += LINUXDEPLOYQT_VERSION="'\"$(shell git describe --tags $(shell git rev-list --tags --skip=1 --max-count=1) --abbrev=0)\"'"

Loading…
Cancel
Save