From 213cd5d48c976f41d20e9a248157b72f97372ae9 Mon Sep 17 00:00:00 2001 From: lupoDharkael Date: Mon, 23 Apr 2018 20:17:34 +0200 Subject: [PATCH] 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. --- docs/dev/release.md | 1 + flameshot.pro | 3 +++ 2 files changed, 4 insertions(+) diff --git a/docs/dev/release.md b/docs/dev/release.md index bdc536eb..fbde2cea 100644 --- a/docs/dev/release.md +++ b/docs/dev/release.md @@ -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. diff --git a/flameshot.pro b/flameshot.pro index 2fef15d4..cc908d3f 100644 --- a/flameshot.pro +++ b/flameshot.pro @@ -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