From 1e6c3fa92b1cbb385bab7239a9d8449d9058fc89 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Fri, 31 May 2024 09:58:17 +0200 Subject: [PATCH] Files reformatted by pre-commit --- SCsub | 1 + gdextension/SConstruct | 1 + limboai_version.py | 9 +++++++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/SCsub b/SCsub index 3a95934..fbcbaed 100644 --- a/SCsub +++ b/SCsub @@ -8,6 +8,7 @@ module_env = env.Clone() module_env.Append(CPPDEFINES=["LIMBOAI_MODULE"]) import limboai_version + limboai_version.generate_module_version_header() module_env.add_source_files(env.modules_sources, "*.cpp") diff --git a/gdextension/SConstruct b/gdextension/SConstruct index 83575a0..f9a6465 100644 --- a/gdextension/SConstruct +++ b/gdextension/SConstruct @@ -15,6 +15,7 @@ env = SConscript("godot-cpp/SConstruct") # Generate version header. sys.path.append("./limboai") import limboai_version + os.chdir("./limboai") limboai_version.generate_module_version_header() os.chdir("..") diff --git a/limboai_version.py b/limboai_version.py index c7a3f03..c5562d5 100644 --- a/limboai_version.py +++ b/limboai_version.py @@ -8,8 +8,10 @@ doc_branch = "latest" # Code that generates version header + def _git_hash(short: bool = False): import subprocess + ret = "unknown" try: if short: @@ -31,7 +33,7 @@ def _get_version_info(): "status": status, "doc_branch": doc_branch, "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 "/" #endif // LIMBOAI_VERSION_GEN_H -""".format(**version_info)) +""".format( + **version_info + ) + ) f.close()