1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-21 14:57:09 +00:00

Core: Move generated VERSION_HASH to a .cpp file

This lets us have its definition in `core/version.h` and avoid
rebuilding a handful of files every time the commit hash changes.

(cherry picked from commit 90162851a7)
This commit is contained in:
Rémi Verschelde
2022-02-08 20:50:37 +01:00
parent 6dbb67cc73
commit f50c7f7415
13 changed files with 27 additions and 40 deletions

View File

@@ -93,7 +93,9 @@ def update_version(module_version_string=""):
f.close()
# NOTE: It is safe to generate this file here, since this is still executed serially
fhash = open("core/version_hash.gen.h", "w")
fhash = open("core/version_hash.gen.cpp", "w")
fhash.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n")
fhash.write('#include "core/version.h"\n')
githash = ""
gitfolder = ".git"
@@ -111,7 +113,7 @@ def update_version(module_version_string=""):
else:
githash = head
fhash.write('#define VERSION_HASH "' + githash + '"')
fhash.write('const char *const VERSION_HASH = "' + githash + '";\n')
fhash.close()