diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2021-11-15 10:39:00 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2021-11-15 13:02:21 +0100 |
commit | 5341e6010e80b1c625d9c0a7ebc87b0f1178db23 (patch) | |
tree | d7d1b0d9b80c7b722d497e7541e6a7c56cfe7c60 /methods.py | |
parent | 9e1c190ce16cd3b6174fc7c31119ab59ebc141d9 (diff) |
Allow dehardcoding documentation branch and URL in docs links
This makes it possible to change the branch of the documentation that
URLs are pointing to without having to modify all class reference
files.
In the XML class reference, the `$DOCS_URL` placeholder should be used,
and will be replaced automatically in the editor and when generating
the RST class reference.
The documentation branch string is set in `version.py`.
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
Diffstat (limited to 'methods.py')
-rw-r--r-- | methods.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/methods.py b/methods.py index b2eb7b7c77..3331e159c7 100644 --- a/methods.py +++ b/methods.py @@ -105,6 +105,8 @@ def update_version(module_version_string=""): f.write('#define VERSION_MODULE_CONFIG "' + str(version.module_config) + module_version_string + '"\n') f.write("#define VERSION_YEAR " + str(version.year) + "\n") f.write('#define VERSION_WEBSITE "' + str(version.website) + '"\n') + f.write('#define VERSION_DOCS_BRANCH "' + str(version.docs) + '"\n') + f.write('#define VERSION_DOCS_URL "https://docs.godotengine.org/en/" VERSION_DOCS_BRANCH\n') f.write("#endif // VERSION_GENERATED_GEN_H\n") f.close() |