Created
October 17, 2009 14:20
-
-
Save kogakure/212350 to your computer and use it in GitHub Desktop.
Python: Fabric 0.9/1.x - Synchronize files with rsync
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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