summaryrefslogtreecommitdiff
path: root/hacking
diff options
context:
space:
mode:
authorToshio Kuratomi <a.badger@gmail.com>2020-08-06 19:11:29 -0700
committerToshio Kuratomi <a.badger@gmail.com>2020-08-07 07:59:59 -0700
commit37a7485ac8bb6086f4f61e4ed4be71daee3ce56c (patch)
treed0d2b2e45fb3df7dc79d1c6c37532aae5597cecb /hacking
parent6ac4439a6abe8c87190d25d6ee53962c03b458a1 (diff)
downloadansible-37a7485ac8bb6086f4f61e4ed4be71daee3ce56c.tar.gz
Fix version comparison for determining what ansible to build against
* The version comparison for determining what ansible package to build docs against was comparing the version number for ansible-base but it needed to check the version number for ansible instead * add a comment about some bad logic than needs to be fixed after 2.10.0
Diffstat (limited to 'hacking')
-rw-r--r--hacking/build_library/build_ansible/command_plugins/docs_build.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/hacking/build_library/build_ansible/command_plugins/docs_build.py b/hacking/build_library/build_ansible/command_plugins/docs_build.py
index fc6bcba44d..355f8cbf27 100644
--- a/hacking/build_library/build_ansible/command_plugins/docs_build.py
+++ b/hacking/build_library/build_ansible/command_plugins/docs_build.py
@@ -77,6 +77,10 @@ def generate_full_docs(args):
with TemporaryDirectory() as tmp_dir:
sh.git(['clone', 'https://github.com/ansible-community/ansible-build-data'], _cwd=tmp_dir)
+ # This is wrong. Once ansible and ansible-base major.minor versions get out of sync this
+ # will stop working. We probably need to walk all subdirectories in reverse version order
+ # looking for the latest ansible version which uses something compatible with
+ # ansible_base_major_ver.
deps_files = glob.glob(os.path.join(tmp_dir, 'ansible-build-data',
ansible_base_major_ver, '*.deps'))
if not deps_files:
@@ -88,7 +92,7 @@ def generate_full_docs(args):
for filename in deps_files:
with open(filename, 'r') as f:
deps_data = yaml.safe_load(f.read())
- new_version = Version(deps_data['_ansible_base_version'])
+ new_version = Version(deps_data['_ansible_version'])
if new_version > latest_ver:
latest_ver = new_version
latest = filename