Skip to content

Instantly share code, notes, and snippets.

@kogakure

kogakure/fabfile.py

Created Oct 17, 2009
Embed
What would you like to do?
Python: Fabric 0.9/1.x - Synchronize files with rsync
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Fabric 0.9/1.x – Synchronize files in a project folder with webserver
from fabric.api import env
from fabric.contrib.project import rsync_project
env.hosts = ['domain.com']
env.path = '/home/user/project/'
def sync():
"""
Synchronize project with webserver
"""
rsync_project(env.path, delete=True, exclude=['*.pyc','*.py','.DS_Store'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment