Skip to content

Commit

Permalink
Fixed deployment script in 67d5dc4, dirname was not returning the exp…
Browse files Browse the repository at this point in the history
…ected directory
  • Loading branch information
martinfilliau committed Jan 13, 2015
1 parent 067b46c commit 2cb6639
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ def deploy(version):
with prefix('source %s' % os.path.join(versioned_path, 'bin', 'activate')):
install_dir = prepare(versioned_path)
install(install_dir)
run('rm -f %s' % env.remote_install_dir)
run('ln -s %s %s' % (versioned_path, env.remote_install_dir))
run('rm %s/secrets.py' % install_dir)
run('ln -s %s/secrets.py %s/secrets.py' % (env.secrets_dir, install_dir))
run('rm -f %s' % env.remote_install_dir)
run('ln -s %s %s' % (versioned_path, env.remote_install_dir))
run('touch %s' % os.path.join(env.remote_install_dir, 'talks', 'wsgi.py'))


Expand All @@ -77,9 +79,6 @@ def install(install_dir):
with cd(os.path.dirname(install_dir)):
run('python manage.py syncdb --settings=%s' % env.settings_module)
run('python manage.py collectstatic --noinput --settings=%s' % env.settings_module)
run('rm secrets.py')
run('ln -s %s/secrets.py secrets.py' % env.secrets_dir)


"""
Private methods
Expand Down

0 comments on commit 2cb6639

Please sign in to comment.