mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
Make Git version detection use VERSION_STRING instead of tags
This fixes the problem where 0.4.12-dev versions were erroneously shown as 0.4.11-dev because the tag was added on a separate branch. It also fixes a similar issue when builders didn't fetch new tags when updating. This also removes the number-of-commits-since-tag field, since it's incompatible with this. Said field doesn't seem to be useful anyway if you have the commit hash.
This commit is contained in:
parent
dfd790930c
commit
1be2d32fd5
4 changed files with 38 additions and 19 deletions
|
@ -16,11 +16,13 @@ set(VERSION_MINOR 4)
|
|||
set(VERSION_PATCH 12)
|
||||
set(VERSION_EXTRA "" CACHE STRING "Stuff to append to version string")
|
||||
|
||||
# Change to false for releases
|
||||
set(DEVELOPMENT_BUILD TRUE)
|
||||
|
||||
set(VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
|
||||
if(VERSION_EXTRA)
|
||||
set(VERSION_STRING ${VERSION_STRING}-${VERSION_EXTRA})
|
||||
else()
|
||||
# Comment the following line during release
|
||||
elseif(DEVELOPMENT_BUILD)
|
||||
set(VERSION_STRING "${VERSION_STRING}-dev")
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue