1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +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:
ShadowNinja 2015-05-04 18:46:49 -04:00 committed by est31
parent dfd790930c
commit 1be2d32fd5
4 changed files with 38 additions and 19 deletions

View file

@ -269,7 +269,7 @@ add_custom_target(GenerateVersion
-D "GENERATE_VERSION_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}"
-D "GENERATE_VERSION_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}"
-D "VERSION_STRING=${VERSION_STRING}"
-D "VERSION_EXTRA=${VERSION_EXTRA}"
-D "DEVELOPMENT_BUILD=${DEVELOPMENT_BUILD}"
-P "${CMAKE_SOURCE_DIR}/cmake/Modules/GenerateVersion.cmake"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")