Prevent compilation with empty version

Compiling the project without git installed uses a hardcoded
version with a *-dev ending in the dev versions instead of
the specific commit information after the version.
This commit is contained in:
lupoDharkael
2018-04-23 20:17:34 +02:00
parent eb5c09b29a
commit 213cd5d48c
2 changed files with 4 additions and 0 deletions

View File

@@ -4,3 +4,4 @@
- Update travis version
- Releases always use annotated tags as in `git tag -a v0.5.1 -m "version 0.5.1"`
- Add a changelog description in the Github's release.
- Update .pro hardcoded version.

View File

@@ -7,6 +7,9 @@
win32:LIBS += -luser32 -lshell32
TAG_VERSION = $$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --always --tags)
isEmpty(TAG_VERSION){
TAG_VERSION = v0.6.0-dev
}
DEFINES += APP_VERSION=\\\"$$TAG_VERSION\\\"
QT += core gui widgets network