Fix: include commit hash even when the HEAD=tag

Only consider tags starts with "v"
This commit is contained in:
hunbernd 2020-05-31 02:09:42 +02:00
parent 00102701df
commit 7dda728ef0

View File

@ -425,7 +425,7 @@ defined in command line")
DEFINES += RS_MINI_VERSION=$${RS_MINI_VERSION}
DEFINES += RS_EXTRA_VERSION=\\\"$${RS_EXTRA_VERSION}\\\"
} else {
RS_GIT_DESCRIBE = $$system(git describe)
RS_GIT_DESCRIBE = $$system(git describe --long --match v*.*.*)
contains(RS_GIT_DESCRIBE, ^v\d+\.\d+\.\d+.*) {
RS_GIT_DESCRIBE_SPLIT = $$split(RS_GIT_DESCRIBE, v)
RS_GIT_DESCRIBE_SPLIT = $$split(RS_GIT_DESCRIBE_SPLIT, .)