Add link to github commit for the spec as per request.
This commit is contained in:
parent
876a3d2bbc
commit
ec631c60d4
3 changed files with 11 additions and 5 deletions
|
@ -6,7 +6,7 @@ Version: {{spec_version}}
|
||||||
This specification has been generated from
|
This specification has been generated from
|
||||||
https://github.com/matrix-org/matrix-doc using
|
https://github.com/matrix-org/matrix-doc using
|
||||||
https://github.com/matrix-org/matrix-doc/blob/master/scripts/gendoc.py as of
|
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
|
Changelog
|
||||||
~~~~~~~~~
|
~~~~~~~~~
|
||||||
|
|
|
@ -10,7 +10,10 @@ class MatrixSections(Sections):
|
||||||
|
|
||||||
# pass through git ver so it'll be dropped in the input file
|
# pass through git ver so it'll be dropped in the input file
|
||||||
def render_git_version(self):
|
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):
|
def render_spec_version(self):
|
||||||
spec_meta = self.units.get("spec_meta")
|
spec_meta = self.units.get("spec_meta")
|
||||||
|
|
|
@ -455,11 +455,14 @@ class MatrixUnits(Units):
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
git_dirty = ""
|
git_dirty = ""
|
||||||
|
|
||||||
|
git_version = "Unknown"
|
||||||
if git_branch or git_tag or git_commit or git_dirty:
|
if git_branch or git_tag or git_commit or git_dirty:
|
||||||
git_version = ",".join(
|
git_version = ",".join(
|
||||||
s for s in
|
s for s in
|
||||||
(git_branch, git_tag, git_commit, git_dirty,)
|
(git_branch, git_tag, git_commit, git_dirty,)
|
||||||
if s
|
if s
|
||||||
)
|
).encode("ascii")
|
||||||
return git_version.encode("ascii")
|
return {
|
||||||
return "Unknown rev"
|
"string": git_version,
|
||||||
|
"revision": git_commit
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue