Browse files

It's now possible to have many .cfg files

  • Loading branch information...
1 parent 8f95645 commit 02a79399a627237b781837ca734384670d55435c @h3 committed Apr 19, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 dukeclient/fabric/tasks.py
View
9 dukeclient/fabric/tasks.py
@@ -222,10 +222,17 @@ def buildout(reload=True):
dispatch_event(env, 'on-buildout')
duke_init(env)
+
+ cfg = 'buildout.cfg'
project_path = get_project_path(env)
+ buildout_bin = os.path.join(project_path, '.duke/bin/buildout')
+ custom_cfg = os.path.join(project_path, '%s.cfg' % get_role(env))
+
+ if os.path.exists(custom_cfg):
+ cfg = custom_cfg
with cd(project_path):
- sudo('%s -vvv -c buildout.cfg' % os.path.join(project_path, '.duke/bin/buildout'))
+ sudo('%s -vvv -c %s' % (buildout_bin, cfg))
if reload:
apache('reload')

0 comments on commit 02a7939

Please sign in to comment.