paramiko/fabfile.py

40 lines
1.0 KiB
Python
Raw Permalink Normal View History

from fabric.api import task, sudo, env, local, hosts
2012-10-14 23:40:39 -04:00
from fabric.contrib.project import rsync_project
2013-06-26 12:08:42 -04:00
from fabric.contrib.console import confirm
2012-10-14 23:40:39 -04:00
@task
@hosts("paramiko.org")
2012-10-14 23:40:39 -04:00
def upload_docs():
target = "/var/www/paramiko.org"
staging = "/tmp/paramiko_docs"
sudo("mkdir -p %s" % staging)
sudo("chown -R %s %s" % (env.user, staging))
sudo("rm -rf %s/*" % target)
rsync_project(local_dir='docs/', remote_dir=staging, delete=True)
sudo("cp -R %s/* %s/" % (staging, target))
2013-06-26 12:08:42 -04:00
@task
def build_docs():
local("epydoc --no-private -o docs/ paramiko")
@task
def clean():
local("rm -rf build dist docs")
local("rm -f MANIFEST *.log demos/*.log")
local("rm -f paramiko/*.pyc")
local("rm -f test.log")
local("rm -rf paramiko.egg-info")
@task
def test():
local("python ./test.py")
@task
def release():
confirm("Only hit Enter if you remembered to update the version!")
2013-08-01 14:50:46 -04:00
confirm("Also, did you remember to tag your release?")
2013-06-26 12:08:42 -04:00
build_docs()
local("python setup.py sdist register upload")
upload_docs()