Use antsibull-docs devel for devel docs (#74988)

* Require antsibull 0.34.0.
* Remove Makefile comment about the devel docs building only the core
(formerly base) docs; the behavior was updated in ccbfdec334
Currently 'make coredocs' builds core-only docs; 'make webdocs' builds the full docs even on the devel
branch

Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
pull/75078/head
Felix Fontein 5 years ago committed by GitHub
parent 2c0f050b4f
commit 47c50c38bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -197,8 +197,6 @@ keywords: ../templates/playbooks_keywords.rst.j2
config: ../templates/config.rst.j2
$(CONFIG_DUMPER) --template-file=../templates/config.rst.j2 --output-dir=rst/reference_appendices/ ../../lib/ansible/config/base.yml
# For now, if we're building on devel, just build base docs. In the future we'll want to build docs that
# are the latest versions on galaxy (using a different antsibull-docs subcommand)
plugins:
$(PLUGIN_FORMATTER) full -o rst $(ANSIBLE_VERSION_ARGS) $(PLUGIN_ARGS);\

@ -54,11 +54,8 @@ def find_latest_ansible_dir(build_data_working):
except InvalidVersion:
continue
# Check if it contains any other .deps files than ancestor.deps
deps_files = [
df for df in glob.glob(os.path.join(directory_name, '*.deps'))
if os.path.basename(df) != 'ancestor.deps']
if not deps_files:
# For the devel build, we only need ansible.in, so make sure it's there
if not os.path.exists(os.path.join(directory_name, 'ansible.in')):
continue
if new_version > latest_ver:
@ -150,25 +147,28 @@ def generate_full_docs(args):
ansible_version = args.ansible_version
if ansible_version is None:
ansible_version = find_latest_ansible_dir(build_data_working)
params = ['devel', '--pieces-file', os.path.join(ansible_version, 'ansible.in')]
else:
latest_filename = find_latest_deps_file(build_data_working, ansible_version)
latest_filename = find_latest_deps_file(build_data_working, ansible_version)
# Make a copy of the deps file so that we can set the ansible-base version we'll use
modified_deps_file = os.path.join(tmp_dir, 'ansible.deps')
shutil.copyfile(latest_filename, modified_deps_file)
# Make a copy of the deps file so that we can set the ansible-base version we'll use
modified_deps_file = os.path.join(tmp_dir, 'ansible.deps')
shutil.copyfile(latest_filename, modified_deps_file)
# Put our version of ansible-base into the deps file
with open(modified_deps_file, 'r') as f:
deps_data = yaml.safe_load(f.read())
# Put our version of ansible-base into the deps file
with open(modified_deps_file, 'r') as f:
deps_data = yaml.safe_load(f.read())
deps_data['_ansible_base_version'] = ansible_base__version__
deps_data['_ansible_base_version'] = ansible_base__version__
with open(modified_deps_file, 'w') as f:
f.write(yaml.dump(deps_data))
with open(modified_deps_file, 'w') as f:
f.write(yaml.dump(deps_data))
params = ['stable', '--deps-file', modified_deps_file]
# Generate the plugin rst
return antsibull_docs.run(['antsibull-docs', 'stable', '--deps-file', modified_deps_file,
'--ansible-base-source', str(args.top_dir),
return antsibull_docs.run(['antsibull-docs'] + params +
['--ansible-base-source', str(args.top_dir),
'--dest-dir', args.output_dir])
# If we make this more than just a driver for antsibull:

Loading…
Cancel
Save