Add per-API changelogs

pull/215/head
Daniel Wagner-Hall 9 years ago
parent 5f459e6e0a
commit 39f43abbb7

@ -0,0 +1,10 @@
r0
===
This is the first release of the client-server specification. It is largely a dump of what has currently been implemented, and there are several inconsistencies.
An upcoming minor release will deprecate many of these inconsistencies, and they will be removed in the next major release.
Since the draft stage, the following major changes have been made:
- /api/v1 and /v2_alpha path segments have been replaced with the major version of the release (i.e. 'r0').
- The specification has been split into one specification per API. This is the client-server API. The server-server API can be found documented separately.

@ -10,6 +10,19 @@ local persistent copy of server state.
.. contents:: Table of Contents
.. sectnum::
Changelog
---------
Version of this specification: **%CLIENT_RELEASE_LABEL%**.
{{client_server_changelog}}
For the full historical changelog, see
https://github.com/matrix-org/matrix-doc/blob/master/changelogs/client-server.rst
If this is an unstable snapshot, any changes since the last release may be
viewed using ``git log``.
API Standards
-------------

@ -15,9 +15,9 @@ class MatrixSections(Sections):
def render_git_rev(self):
return self.units.get("git_version")["revision"]
def render_spec_changelog(self):
spec_meta = self.units.get("spec_meta")
return spec_meta["changelog"]
def render_client_server_changelog(self):
changelogs = self.units.get("changelogs")
return changelogs["client_server"]
def _render_events(self, filterFn, sortFn):
template = self.env.get_template("events.tmpl")

@ -21,7 +21,7 @@ HTTP_APIS = ("../api/application-service", "../api/client-server",)
EVENT_EXAMPLES = "../event-schemas/examples"
EVENT_SCHEMA = "../event-schemas/schema"
CORE_EVENT_SCHEMA = "../event-schemas/schema/core-event-schema"
CHANGELOG = "../CHANGELOG.rst"
CHANGELOG_DIR = "../changelogs"
TARGETS = "../specification/targets.yaml"
ROOM_EVENT = "core-event-schema/room_event.yaml"
@ -711,13 +711,21 @@ class MatrixUnits(Units):
schemata[filename] = schema
return schemata
def load_spec_meta(self):
path = CHANGELOG
title_part = None
changelog_lines = []
with open(path, "r") as f:
def load_changelogs(self):
changelogs = {}
for f in os.listdir(CHANGELOG_DIR):
if not f.endswith(".rst"):
continue
path = os.path.join(CHANGELOG_DIR, f)
name = f[:-4]
title_part = None
changelog_lines = []
with open(path, "r") as f:
lines = f.readlines()
prev_line = None
for line in f.readlines():
for line in lines:
if line.strip().startswith(".. "):
continue # comment
if prev_line is None:
@ -735,15 +743,10 @@ class MatrixUnits(Units):
# then bail out.
changelog_lines.pop()
break
changelog_lines.append(line)
changelog_lines.append(" " + line)
changelogs[name] = "\n".join(changelog_lines)
self.log("Title part: %s Changelog line count: %s" % (
title_part, len(changelog_lines)
))
return {
"changelog": "".join(changelog_lines)
}
return changelogs
def load_spec_targets(self):

Loading…
Cancel
Save