[tor-commits] [ooni-probe/master] Add fabfile for updating of ooniprobe docs on ooni.tpo

art at torproject.org art at torproject.org
Tue Apr 30 13:01:43 UTC 2013


commit 4a27bdbd4a2e306c013c0d8326b6e15aa8d5b4eb
Author: Arturo Filastò <art at fuffa.org>
Date:   Thu Jan 31 13:41:12 2013 +0100

    Add fabfile for updating of ooniprobe docs on ooni.tpo
---
 docs/fabfile.py |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/docs/fabfile.py b/docs/fabfile.py
new file mode 100644
index 0000000..d0461fd
--- /dev/null
+++ b/docs/fabfile.py
@@ -0,0 +1,20 @@
+import os
+from fabric.api import run
+from fabric.context_managers import settings
+from fabric.operations import sudo, local, put
+
+def update_docs():
+    local('make html')
+    build_dir = os.path.join(os.getcwd(), 'build', 'html')
+    put(build_dir, '/tmp')
+
+    run("sudo -u ooni rm -rf /home/ooni/website/build/docs/")
+    run("sudo -u ooni cp -R /tmp/html/ /home/ooni/website/build/docs")
+
+    run("rm -rf /tmp/html")
+    update_website()
+
+def update_website():
+    run("sudo -u mirroradm /usr/local/bin/static-master-update-component ooni.torproject.org")
+
+





More information about the tor-commits mailing list