[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Add fabfile for updating of ooniprobe docs on ooni.tpo
commit 4a27bdbd4a2e306c013c0d8326b6e15aa8d5b4eb
Author: Arturo Filastò <art@xxxxxxxxx>
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")
+
+
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits