From a6fa4e53fb76c1a0e618dcff786af75d1a4fb662 Mon Sep 17 00:00:00 2001
From: Kegan Dougal <kegan@matrix.org>
Date: Fri, 20 Feb 2015 11:25:05 +0000
Subject: [PATCH] Update gendoc.py

Copy howto to tmp/ so the $GIT_VERSION can be dropped in.
---
 scripts/gendoc.py                        | 8 +++++---
 supporting-docs/howtos/client-server.rst | 4 +++-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/scripts/gendoc.py b/scripts/gendoc.py
index 82d76a156..1b0086854 100755
--- a/scripts/gendoc.py
+++ b/scripts/gendoc.py
@@ -62,7 +62,7 @@ def get_git_ver_string():
     return "Unknown rev"
 
 
-def glob_spec(out_file_name):
+def glob_spec_to(out_file_name):
     with open(out_file_name, "wb") as outfile:
         for f in sorted(glob.glob("../specification/*.rst")):
             with open(f, "rb") as infile:
@@ -105,10 +105,12 @@ def cleanup_env():
 
 def main():
     prepare_env()
-    glob_spec("tmp/full_spec.rst")
+    glob_spec_to("tmp/full_spec.rst")
+    shutil.copy("../supporting-docs/howtos/client-server.rst", "tmp/howto.rst")
     set_git_version("tmp/full_spec.rst")
+    set_git_version("tmp/howto.rst")
     rst2html("tmp/full_spec.rst", "gen/specification.html")
-    rst2html("../supporting-docs/howtos/client-server.rst", "gen/howtos.html")
+    rst2html("tmp/howto.rst", "gen/howtos.html")
     cleanup_env()
 
 if __name__ == '__main__':
diff --git a/supporting-docs/howtos/client-server.rst b/supporting-docs/howtos/client-server.rst
index bfb606a41..f2830ff21 100644
--- a/supporting-docs/howtos/client-server.rst
+++ b/supporting-docs/howtos/client-server.rst
@@ -4,10 +4,12 @@
   would be better if /register used the same technique as /login? /register should
   be "user" not "user_id".
 
-
 How to use the client-server API
 ================================
 
+.. NOTE::
+  The git version of this document is ``$GIT_VERSION``
+
 This guide focuses on how the client-server APIs *provided by the reference 
 home server* can be used. Since this is specific to a home server 
 implementation, there may be variations in relation to registering/logging in
-- 
GitLab