Skip to content

Commit

Permalink
website: Make latest release (1.7) be default manual (#3130)
Browse files Browse the repository at this point in the history
Fixes issue with confusion about features that has not been
released yet.

Move deveopment manual.yml to dev/manual.yml
Symlink manual.yml to v1.7/manual.yml
Refactor to share history header with links to other manual versions.
Change man.test and man page generation to use dev/manual.yml

Related to #3078 #3127
  • Loading branch information
wader authored Jul 12, 2024
1 parent 2ee20ca commit c1d885b
Showing 12 changed files with 3,818 additions and 3,840 deletions.
8 changes: 4 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -160,10 +160,10 @@ check_DATA = tests/man.test
# Making changes to the manpage without having the python deps means your
# tests won't run. If you aren't making changes to the examples, you probably
# don't care. But if you are, then you need to run the tests anyway.
tests/man.test tests/manonig.test: $(srcdir)/docs/content/manual/manual.yml
tests/man.test tests/manonig.test: $(srcdir)/docs/content/manual/dev/manual.yml
if ENABLE_DOCS
$(AM_V_GEN) ( cd ${abs_srcdir}/docs && \
$(PIPENV) run python validate_manual_schema.py content/manual/manual.yml && \
$(PIPENV) run python validate_manual_schema.py content/manual/dev/manual.yml && \
$(PIPENV) run python build_mantests.py )
else
@echo Changes to the manual.yml require docs to be enabled to update the manual test.
@@ -176,10 +176,10 @@ endif
# manpage, then we'll end up using the cached version. Otherwise, we need to
# rebuild it.
man_MANS = jq.1
jq.1.prebuilt: $(srcdir)/docs/content/manual/manual.yml
jq.1.prebuilt: $(srcdir)/docs/content/manual/dev/manual.yml
if ENABLE_DOCS
$(AM_V_GEN) ( cd ${abs_srcdir}/docs && \
$(PIPENV) run python validate_manual_schema.py content/manual/manual.yml && \
$(PIPENV) run python validate_manual_schema.py content/manual/dev/manual.yml && \
$(PIPENV) run python build_manpage.py ) > $@
else
@echo Changes to the manual.yml require docs to be enabled to update the manpage.
2 changes: 1 addition & 1 deletion docs/build_manpage.py
Original file line number Diff line number Diff line change
@@ -209,7 +209,7 @@ def dedent_body(body):

def convert_manual_to_markdown():
f = StringIO()
manual = load_yml_file("content/manual/manual.yml")
manual = load_yml_file("content/manual/dev/manual.yml")
f.write(manual.get('manpage_intro', '\n'))
f.write(dedent_body(manual.get('body', '\n')))
for section in manual.get('sections', []):
2 changes: 1 addition & 1 deletion docs/build_mantests.py
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
regex_program_pattern = re.compile(
r'\b(?:test|match|capture|scan|split|splits|sub|gsub)\s*\(')

with open('content/manual/manual.yml') as source, \
with open('content/manual/dev/manual.yml') as source, \
open('../tests/man.test', 'w') as man, \
open('../tests/manonig.test', 'w') as manonig:
manual = yaml.safe_load(source)
Loading

0 comments on commit c1d885b

Please sign in to comment.