Skip to content

Commit

Permalink
Files reformatted by pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
limbonaut committed May 31, 2024
1 parent a4eb167 commit a0b4b3e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
1 change: 1 addition & 0 deletions gdextension/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -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("..")
Expand Down
9 changes: 7 additions & 2 deletions limboai_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@

# Code that generates version header


def _git_hash(short: bool = False):
import subprocess

ret = "unknown"
try:
if short:
Expand All @@ -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),
}


Expand All @@ -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()

0 comments on commit a0b4b3e

Please sign in to comment.