Skip to content

Commit 42e07a1

Browse files
authored
Remove 2.10 from build (#1046)
1 parent c6f4487 commit 42e07a1

File tree

3 files changed

+11
-172
lines changed

3 files changed

+11
-172
lines changed

docs/docsite/Makefile

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,9 @@ gettext_generate_rst: collections_meta config cli keywords
7979
# from the same set of rst files (Ansible the package docs, and core docs).
8080
# Symlink the relevant index into place for building Ansible docs
8181
ansible_structure:
82-
# We must have python and python-packaging for the version_helper
83-
# script so use it for version comparison
84-
if $(PYTHON) -c "import sys, packaging.version as p; sys.exit(not p.Version('$(MAJOR_VERSION)') > p.Version('2.10'))" ; then \
85-
echo "Creating symlinks in ansible_structure"; \
86-
ln -sf ../rst/ansible_index.rst rst/index.rst; \
87-
ln -sf ../dev_guide/ansible_index.rst rst/dev_guide/index.rst; \
88-
else \
89-
echo 'Creating symlinks for older ansible in ansible_structure'; \
90-
ln -sf ../rst/2.10_index.rst rst/index.rst; \
91-
fi
82+
@echo "Creating symlinks in ansible_structure"
83+
ln -sf ../rst/ansible_index.rst rst/index.rst
84+
ln -sf ../dev_guide/ansible_index.rst rst/dev_guide/index.rst
9285

9386
# Symlink the relevant index into place for building core docs
9487
core_structure:
@@ -123,11 +116,7 @@ else
123116
endif
124117

125118
htmldocs: ansible_structure generate_rst
126-
if $(PYTHON) -c "import sys, packaging.version as p; sys.exit(not p.Version('$(MAJOR_VERSION)') > p.Version('2.10'))" ; then \
127-
CPUS=$(CPUS) $(MAKE) -f Makefile.sphinx 'DOCS_VARIANTS=-t ansible' html; \
128-
else \
129-
CPUS=$(CPUS) $(MAKE) -f Makefile.sphinx 'DOCS_VARIANTS=-t 2.10' html; \
130-
fi
119+
CPUS=$(CPUS) $(MAKE) -f Makefile.sphinx 'DOCS_VARIANTS=-t ansible' html
131120

132121
core_htmldocs: core_structure core_generate_rst
133122
ifdef LANGOPTS
@@ -137,11 +126,7 @@ else
137126
endif
138127

139128
singlehtmldocs: ansible_structure generate_rst
140-
if $(PYTHON) -c "import sys, packaging.version as p; sys.exit(not p.Version('$(MAJOR_VERSION)') > p.Version('2.10'))" ; then \
141-
CPUS=$(CPUS) $(MAKE) -f Makefile.sphinx 'DOCS_VARIANTS=-t ansible' singlehtml; \
142-
else \
143-
CPUS=$(CPUS) $(MAKE) -f Makefile.sphinx 'DOCS_VARIANTS=-t 2.10' singlehtml; \
144-
fi
129+
CPUS=$(CPUS) $(MAKE) -f Makefile.sphinx 'DOCS_VARIANTS=-t ansible' singlehtml
145130

146131
core_singlehtmldocs: core_structure core_generate_rst
147132
ifdef LANGOPTS

docs/docsite/rst/2.10_index.rst

Lines changed: 0 additions & 106 deletions
This file was deleted.

docs/docsite/rst/conf.py

Lines changed: 6 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
# the repository version needs to be the one that is loaded:
3333
sys.path.insert(0, os.path.abspath(os.path.join('..', '..', '..', 'lib')))
3434

35-
KNOWN_TAGS = {'all', 'ansible', 'core', 'core_lang', '2.10'}
35+
KNOWN_TAGS = {'all', 'ansible', 'core', 'core_lang'}
3636

3737
applied_tags_count = sum(
3838
int(tags.has(known_tag_name)) for known_tag_name in KNOWN_TAGS
@@ -46,8 +46,7 @@
4646
# Controls branch version for core releases
4747
'devel' if tags.has('core_lang') or tags.has('core') else
4848
# Controls branch version for Ansible package releases
49-
'devel' if tags.has('ansible') or tags.has('all') else
50-
'2.10' if tags.has('2.10')
49+
'devel' if tags.has('ansible') or tags.has('all')
5150
else '<UNKNOWN>'
5251
)
5352
AUTHOR = 'Ansible, Inc'
@@ -85,7 +84,7 @@
8584
project = (
8685
'Ansible Core' if (
8786
tags.has('all') or tags.has('core_lang') or tags.has('core')
88-
) else 'Ansible' if tags.has('2.10') or tags.has('ansible')
87+
) else 'Ansible' if tags.has('ansible')
8988
else '<UNKNOWN>'
9089
)
9190

@@ -115,7 +114,6 @@
115114
# A list of glob-style patterns that should be excluded when looking
116115
# for source files.
117116
exclude_patterns = [] if tags.has('all') else [
118-
'2.10_index.rst',
119117
'ansible_index.rst',
120118
'core_index.rst',
121119
]
@@ -173,15 +171,7 @@
173171
'roadmap/COLLECTIONS*'
174172
] if tags.has('core_lang') or tags.has('core') else [
175173
'porting_guides/core_porting_guides',
176-
] if tags.has('ansible') else [
177-
'dev_guide/ansible_index.rst',
178-
'dev_guide/core_index.rst',
179-
'dev_guide/core_branches_and_tags.rst',
180-
'porting_guides/core_porting_guides.rst',
181-
'porting_guides/porting_guide_base_2.10.rst',
182-
'porting_guides/porting_guide_core_*',
183-
'roadmap/index.rst',
184-
] if tags.has('2.10') else '<UNKNOWN>'
174+
] if tags.has('ansible') else '<UNKNOWN>'
185175

186176
# The reST default role (used for this markup: `text`) to use for all
187177
# documents.
@@ -249,7 +239,6 @@
249239
'latest_version': (
250240
'devel' if tags.has('all') else
251241
'2.16' if tags.has('core_lang') or tags.has('core') else
252-
'2.10' if tags.has('2.10') else
253242
'9' if tags.has('ansible')
254243
else '<UNKNOWN>'
255244
),
@@ -258,7 +247,6 @@
258247
('devel',) if tags.has('all') else
259248
('2.15_ja', '2.14_ja', '2.13_ja',) if tags.has('core_lang') else
260249
('2.16', '2.15', '2.14', 'devel',) if tags.has('core') else
261-
('latest', '2.9', '2.9_ja', '2.8', 'devel') if tags.has('2.10') else
262250
('latest', '2.9', 'devel') if tags.has('ansible')
263251
else '<UNKNOWN>'
264252
),
@@ -275,7 +263,7 @@
275263
html_title = (
276264
'Ansible Core Documentation' if (
277265
tags.has('all') or tags.has('core_lang') or tags.has('core')
278-
) else 'Ansible Documentation' if tags.has('2.10') or tags.has('ansible')
266+
) else 'Ansible Documentation' if tags.has('ansible')
279267
else '<UNKNOWN>'
280268
)
281269

@@ -390,35 +378,7 @@
390378
'jinja2': ('http://jinja.palletsprojects.com/', None),
391379
'ansible_2_9': ('https://docs.ansible.com/ansible/2.9/', None),
392380
'ansible_9': ('https://docs.ansible.com/ansible/9/', None),
393-
} if tags.has('all') else {
394-
'python': ('https://docs.python.org/2/', None),
395-
'python3': ('https://docs.python.org/3/', None),
396-
'jinja2': ('http://jinja.palletsprojects.com/', None),
397-
'ansible_2_9': ('https://docs.ansible.com/ansible/2.9/', None),
398-
'ansible_9': ('https://docs.ansible.com/ansible/9/', None),
399-
} if tags.has('core_lang') else {
400-
'python': ('https://docs.python.org/2/', None),
401-
'python3': ('https://docs.python.org/3/', None),
402-
'jinja2': ('http://jinja.palletsprojects.com/', None),
403-
'ansible_2_9': ('https://docs.ansible.com/ansible/2.9/', None),
404-
'ansible_9': ('https://docs.ansible.com/ansible/9/', None),
405-
} if tags.has('core') else {
406-
'python': ('https://docs.python.org/2/', None),
407-
'python3': ('https://docs.python.org/3/', None),
408-
'jinja2': ('http://jinja.palletsprojects.com/', None),
409-
'ansible_2_10': ('https://docs.ansible.com/ansible/2.10/', None),
410-
'ansible_2_9': ('https://docs.ansible.com/ansible/2.9/', None),
411-
'ansible_2_8': ('https://docs.ansible.com/ansible/2.8/', None),
412-
'ansible_2_7': ('https://docs.ansible.com/ansible/2.7/', None),
413-
'ansible_2_6': ('https://docs.ansible.com/ansible/2.6/', None),
414-
'ansible_2_5': ('https://docs.ansible.com/ansible/2.5/', None),
415-
} if tags.has('2.10') else {
416-
'python': ('https://docs.python.org/2/', None),
417-
'python3': ('https://docs.python.org/3/', None),
418-
'jinja2': ('http://jinja.palletsprojects.com/', None),
419-
'ansible_2_9': ('https://docs.ansible.com/ansible/2.9/', None),
420-
'ansible_9': ('https://docs.ansible.com/ansible/9/', None),
421-
} if tags.has('ansible') else {}
381+
}
422382

423383
# linckchecker settings
424384
linkcheck_ignore = [

0 commit comments

Comments
 (0)