Add link to github commit for the spec as per request.

pull/977/head
Kegan Dougal 9 years ago
parent 876a3d2bbc
commit ec631c60d4

@ -6,7 +6,7 @@ Version: {{spec_version}}
This specification has been generated from
https://github.com/matrix-org/matrix-doc using
https://github.com/matrix-org/matrix-doc/blob/master/scripts/gendoc.py as of
revision ``{{git_version}}``.
revision ``{{git_version}}`` - https://github.com/matrix-org/matrix-doc/tree/{{git_rev}}
Changelog
~~~~~~~~~

@ -10,7 +10,10 @@ class MatrixSections(Sections):
# pass through git ver so it'll be dropped in the input file
def render_git_version(self):
return self.units.get("git_version")
return self.units.get("git_version")["string"]
def render_git_rev(self):
return self.units.get("git_version")["revision"]
def render_spec_version(self):
spec_meta = self.units.get("spec_meta")

@ -455,11 +455,14 @@ class MatrixUnits(Units):
except subprocess.CalledProcessError:
git_dirty = ""
git_version = "Unknown"
if git_branch or git_tag or git_commit or git_dirty:
git_version = ",".join(
s for s in
(git_branch, git_tag, git_commit, git_dirty,)
if s
)
return git_version.encode("ascii")
return "Unknown rev"
).encode("ascii")
return {
"string": git_version,
"revision": git_commit
}

Loading…
Cancel
Save