Files reformatted by pre-commit

This commit is contained in:
Serhii Snitsaruk 2024-05-31 09:58:17 +02:00
parent 35f2c3c142
commit 1e6c3fa92b
No known key found for this signature in database
GPG Key ID: A965EF8799FFEC2D
3 changed files with 9 additions and 2 deletions

1
SCsub
View File

@ -8,6 +8,7 @@ module_env = env.Clone()
module_env.Append(CPPDEFINES=["LIMBOAI_MODULE"]) module_env.Append(CPPDEFINES=["LIMBOAI_MODULE"])
import limboai_version import limboai_version
limboai_version.generate_module_version_header() limboai_version.generate_module_version_header()
module_env.add_source_files(env.modules_sources, "*.cpp") module_env.add_source_files(env.modules_sources, "*.cpp")

View File

@ -15,6 +15,7 @@ env = SConscript("godot-cpp/SConstruct")
# Generate version header. # Generate version header.
sys.path.append("./limboai") sys.path.append("./limboai")
import limboai_version import limboai_version
os.chdir("./limboai") os.chdir("./limboai")
limboai_version.generate_module_version_header() limboai_version.generate_module_version_header()
os.chdir("..") os.chdir("..")

View File

@ -8,8 +8,10 @@ doc_branch = "latest"
# Code that generates version header # Code that generates version header
def _git_hash(short: bool = False): def _git_hash(short: bool = False):
import subprocess import subprocess
ret = "unknown" ret = "unknown"
try: try:
if short: if short:
@ -31,7 +33,7 @@ def _get_version_info():
"status": status, "status": status,
"doc_branch": doc_branch, "doc_branch": doc_branch,
"git_short_hash": _git_hash(short=True), "git_short_hash": _git_hash(short=True),
"git_hash": _git_hash(short=False) "git_hash": _git_hash(short=False),
} }
@ -55,5 +57,8 @@ def generate_module_version_header():
#define LIMBOAI_VERSION_DOC_URL "https://limboai.readthedocs.io/en/" LIMBOAI_VERSION_DOC_BRANCH "/" #define LIMBOAI_VERSION_DOC_URL "https://limboai.readthedocs.io/en/" LIMBOAI_VERSION_DOC_BRANCH "/"
#endif // LIMBOAI_VERSION_GEN_H #endif // LIMBOAI_VERSION_GEN_H
""".format(**version_info)) """.format(
**version_info
)
)
f.close() f.close()