Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

docs: Rewrite tools/build-docs in python.

tushar91294afc7276452
diff --git a/tools/build-docs b/tools/build-docs
index 44e81553f8d..5b8dca523ea 100755
--- a/tools/build-docs
+++ b/tools/build-docs
@@ -1,3 +1,22 @@
-#!/usr/bin/env bash
-set -eu
-make -C "$(dirname "$0")"/../docs clean html
+#!/usr/bin/env python3
+
+# check for the venv
+from lib import sanity_check
+
+sanity_check.check_venv(__file__)
+
+import os
+import sys
+
+ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+sys.path.append(ZULIP_PATH)
+from scripts.lib.zulip_tools import run
+
+
+def main() -> None:
+ path = os.path.join(ZULIP_PATH, "docs")
+ run(["make", "clean", "html", "-C", path])
+
+
+if __name__ == "__main__":
+ main()