Skip to content

Instantly share code, notes, and snippets.

@hzbd
Forked from yveson33/gist:3715457
Created April 23, 2013 17:41
Show Gist options
  • Save hzbd/5445729 to your computer and use it in GitHub Desktop.
Save hzbd/5445729 to your computer and use it in GitHub Desktop.
import os
from os import path
from fabric.api import local, settings, abort, run, cd, env, sudo
from fabric.contrib.project import rsync_project
env.hosts = [host,]
env.user = 'user'
exclude = []
def prepare_deploy():
local("rm -rf app/cache/*")
local("rm -rf app/logs/*")
local("app/console cache:clear")
def deploy():
prepare_deploy()
remote_dir = "path to remote dir"
local_dir = os.getcwd()
rsync_project(remote_dir, local_dir+"/", exclude="", delete=True)
with cd(remote_dir):
run(" app/console assets:install web --symlink")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment