From: Radek Czajka Date: Fri, 30 Nov 2012 16:33:09 +0000 (+0100) Subject: fabric fix X-Git-Tag: 0.1.5~6 X-Git-Url: https://git.mdrn.pl/fnpdjango.git/commitdiff_plain/62132a15d022291be5b5403ed44647566efb8922?ds=sidebyside;hp=a30f7ce023f088f521957c38f1a3838a494ad583 fabric fix --- diff --git a/fnpdjango/deploy/__init__.py b/fnpdjango/deploy/__init__.py index 9c7d762..50a0d62 100644 --- a/fnpdjango/deploy/__init__.py +++ b/fnpdjango/deploy/__init__.py @@ -32,7 +32,7 @@ def setup(): run('mkdir -p %(app_path)s' % env, pty=True) run('%(virtualenv)s %(app_path)s/ve' % env, pty=True) run('mkdir -p %(app_path)s/releases %(app_path)s/packages' % env, pty=True) - run('cd %(app_path)s/releases; ln -s . current; ln -s . previous' % env, pty=True) + run('cd %(app_path)s/releases; ln -sfT . current; ln -sfT . previous' % env, pty=True) upload_samples() print "Fill out db details in localsettings.py and run deploy." @@ -131,7 +131,7 @@ def check_setup(): try: run('[ -e %(app_path)s/ve ]' % env) except SystemExit: - print "Environment isn't ready. Run fab deploy.setup first." + print "Environment isn't ready. Run `fab setup` first." raise def upload_samples(): @@ -145,7 +145,7 @@ def upload_localsettings_sample(): require('app_path', 'project_name') template = '%(project_name)s/localsettings.py.template' if not exists(template): - template = join(dirname(abspath(__file__)), 'localsettings.py.template') + template = join(dirname(abspath(__file__)), 'templates/localsettings.py.template') env.secret_key = '' # sth random files.upload_template(template, '%(app_path)s/localsettings.py.sample' % env, env) @@ -155,7 +155,7 @@ def upload_nginx_sample(): require('app_path', 'project_name') template = '%(project_name)s/nginx.template' if not exists(template): - template = join(dirname(abspath(__file__)), 'nginx.template') + template = join(dirname(abspath(__file__)), 'templates/nginx.template') files.upload_template(template, '%(app_path)s/nginx.sample' % env, env) def upload_gunicorn_sample(): @@ -164,7 +164,7 @@ def upload_gunicorn_sample(): require('app_path', 'project_name') template = '%(project_name)s/gunicorn.template' if not exists(template): - template = join(dirname(abspath(__file__)), 'gunicorn.template') + template = join(dirname(abspath(__file__)), 'templates/gunicorn.template') files.upload_template(template, '%(app_path)s/gunicorn.sample' % env, env) def upload_tar_from_git():