Antsibull build format backport 71080 (#71285)
* Updates to docs build for new antsibull CLI * --ansible-base-cache renamed to --ansible-base-source * _acd_version in the .deps file has been renamed to _ansible_version (cherry picked from commit22d2c97b81
) * Fix expr regex for MacOSX compat MacOSX seems to want bare `+` whereas GNU expr wants escaped `+` (`\+`) to mean match one or more. Use `\{1,\}` instead which will match one or more on both MaxOSX and GNU-using systems. Fixes #71053 (cherry picked from commit99cac0b135
) * Force an upgrade to a newer version of antsibull (cherry picked from commitd816a5966e
)
This commit is contained in:
parent
67b2b8caf1
commit
7662568bd8
3 changed files with 11 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
@ -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);\
|
||||
|
|
|
@ -44,8 +44,8 @@ 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:
|
||||
|
@ -53,7 +53,7 @@ def generate_base_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:
|
||||
|
@ -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:
|
||||
|
|
|
@ -47,6 +47,9 @@ setuptools < 45 ; python_version == '2.7' # setuptools 45 and later require pyth
|
|||
# freeze antsibull-changelog for consistent test results
|
||||
antsibull-changelog == 0.7.0
|
||||
|
||||
# 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
|
||||
|
|
Loading…
Reference in a new issue