[libcxx-commits] [PATCH] D111926: [libc++][doc] Use sphinx variables to make updating the docs version easier
Tom Stellard via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Oct 18 09:55:56 PDT 2021
tstellar updated this revision to Diff 380451.
tstellar added a comment.
Thanks for the feedback. Here is an updated version of the patch with
some of your suggestions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111926/new/
https://reviews.llvm.org/D111926
Files:
libcxx/docs/ReleaseNotes.rst
libcxx/docs/conf.py
Index: libcxx/docs/conf.py
===================================================================
--- libcxx/docs/conf.py
+++ libcxx/docs/conf.py
@@ -47,10 +47,15 @@
# |version| and |release|, also used in various other places throughout the
# built documents.
#
-# The short X.Y version.
-version = '14.0'
+# The major version.
+version = '14'
+
+# True if this is a pre_release. This should be True in the main
+# branch and False in the release branches.
+pre_release = True
+
# The full version, including alpha/beta/rc tags.
-release = '14.0'
+release = version + '.0.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -87,6 +92,15 @@
#modindex_common_prefix = []
+if pre_release:
+ tags.add('PreRelease')
+
+in_progress_title = "(In-Progress) " if pre_release else ""
+
+rst_epilog = f"""
+.. |ReleaseNotesTitle| replace:: {in_progress_title} Release Notes
+"""
+
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
Index: libcxx/docs/ReleaseNotes.rst
===================================================================
--- libcxx/docs/ReleaseNotes.rst
+++ libcxx/docs/ReleaseNotes.rst
@@ -1,6 +1,6 @@
-=========================================
-Libc++ 14.0.0 (In-Progress) Release Notes
-=========================================
+==================================================
+Libc++ |version| |ReleaseNotesTitle|
+==================================================
.. contents::
:local:
@@ -8,17 +8,18 @@
Written by the `Libc++ Team <https://libcxx.llvm.org>`_
-.. warning::
+.. only:: PreRelease
- These are in-progress notes for the upcoming libc++ 14 release.
- Release notes for previous releases can be found on
- `the Download Page <https://releases.llvm.org/download.html>`_.
+ .. warning::
+ These are in-progress notes for the upcoming libc++ |version| release.
+ Release notes for previous releases can be found on
+ `the Download Page <https://releases.llvm.org/download.html>`_.
Introduction
============
This document contains the release notes for the libc++ C++ Standard Library,
-part of the LLVM Compiler Infrastructure, release 14.0.0. Here we describe the
+part of the LLVM Compiler Infrastructure, release |version|. Here we describe the
status of libc++ in some detail, including major improvements from the previous
release and new feature work. For the general LLVM release notes, see `the LLVM
documentation <https://llvm.org/docs/ReleaseNotes.html>`_. All LLVM releases may
@@ -32,8 +33,8 @@
the current one. To see the release notes for a specific release, please
see the `releases page <https://llvm.org/releases/>`_.
-What's New in Libc++ 14.0.0?
-============================
+What's New in Libc++ |version|?
+===============================
New Features
------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111926.380451.patch
Type: text/x-patch
Size: 2950 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211018/183e512c/attachment.bin>
More information about the libcxx-commits
mailing list