Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Antsibull build format backport 71080 #71285

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/docsite/Makefile
Expand Up @@ -56,6 +56,9 @@ base_generate_rst: collections_meta config cli keywords base_plugins testing
htmldocs: generate_rst
CPUS=$(CPUS) $(MAKE) -f Makefile.sphinx html

base_htmldocs: base_generate_rst
CPUS=$(CPUS) $(MAKE) -f Makefile.sphinx html

singlehtmldocs: generate_rst
CPUS=$(CPUS) $(MAKE) -f Makefile.sphinx singlehtml

Expand Down Expand Up @@ -115,7 +118,7 @@ config: ../templates/config.rst.j2
# 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:
if expr match "$(VERSION)" '.*[.]dev[0-9]\+$$' &> /dev/null; then \
if expr "$(VERSION)" : '.*[.]dev[0-9]\{1,\}$$' &> /dev/null; then \
$(PLUGIN_FORMATTER) base -o rst $(PLUGIN_ARGS);\
else \
$(PLUGIN_FORMATTER) full -o rst $(PLUGIN_ARGS);\
Expand Down
Expand Up @@ -44,16 +44,16 @@ def generate_base_docs(args):
#
modified_deps_file = os.path.join(tmp_dir, 'ansible.deps')

# The _acd_version doesn't matter
deps_file_contents = {'_acd_version': ansible_base__version__,
# The _ansible_version doesn't matter since we're only building docs for base
deps_file_contents = {'_ansible_version': ansible_base__version__,
'_ansible_base_version': ansible_base__version__}

with open(modified_deps_file, 'w') as f:
f.write(yaml.dump(deps_file_contents))

# Generate the plugin rst
return antsibull_docs.run(['antsibull-docs', 'stable', '--deps-file', modified_deps_file,
'--ansible-base-cache', str(args.top_dir),
'--ansible-base-source', str(args.top_dir),
'--dest-dir', args.output_dir])

# If we make this more than just a driver for antsibull:
Expand Down Expand Up @@ -112,7 +112,7 @@ def generate_full_docs(args):

# Generate the plugin rst
return antsibull_docs.run(['antsibull-docs', 'stable', '--deps-file', modified_deps_file,
'--ansible-base-cache', str(args.top_dir),
'--ansible-base-source', str(args.top_dir),
'--dest-dir', args.output_dir])

# If we make this more than just a driver for antsibull:
Expand Down
3 changes: 3 additions & 0 deletions test/lib/ansible_test/_data/requirements/constraints.txt
Expand Up @@ -48,6 +48,9 @@ setuptools < 45 ; python_version == '2.7' # setuptools 45 and later require pyth
# freeze antsibull-changelog for consistent test results
antsibull-changelog == 0.3.1

# Make sure we have a new enough antsibull for the CLI args we use
antsibull >= 0.21.0

# freeze pylint and its requirements for consistent test results
astroid == 2.2.5
isort == 4.3.15
Expand Down