kogakure (owner)

Revisions

gist: 212350 Download_button fork
public
Description:
Fabric 0.9/1.x – Synchronize files with rsync
Public Clone URL: git://gist.github.com/212350.git
Embed All Files: show embed
fabfile.py #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/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'])