Unverified Commit 1c69f3c6 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

Add git branch support for profile

parent a5b0f160
......@@ -18,6 +18,7 @@ env.site_environment = 'local'
env.site_profile = ''
env.site_profile_repo = ''
env.site_profile_makefile = ''
env.site_profile_branch= '7.x'
env.site_db_user = 'dev'
env.site_db_pass = 'dev'
env.site_db_host = 'localhost'
......
......@@ -52,7 +52,7 @@ def make(action='install'):
if not h.fab_exists('local', env.site_root):
h.fab_run('local', "mkdir {}".format(env.site_root))
with h.fab_cd('local', env.site_root):
h.fab_run('local', 'drush make {} {} -y'.format(drush_opts, env.makefile))
h.fab_run('local', '{} make {} {} -y'.format(env.drush, drush_opts, env.makefile))
@task
......@@ -117,8 +117,8 @@ def site_install():
with h.fab_cd(role, site_root):
locale = '--locale="fr"' if env.locale else ''
h.fab_run(role, 'sudo -u {} drush site-install {} {} --db-url=mysql://{}:{}@{}/{} --site-name={} '
'--account-name={} --account-pass={} --sites-subdir={} -y'.format(apache, profile, locale,
h.fab_run(role, 'sudo -u {} {} site-install {} {} --db-url=mysql://{}:{}@{}/{} --site-name={} '
'--account-name={} --account-pass={} --sites-subdir={} -y'.format(apache, env.drush, profile, locale,
db_user, db_pass,
db_host, db_name, site_name,
site_admin_name,
......
......@@ -169,7 +169,7 @@ def update_profile(role='local'):
print green('{} installation profile updated in {}/{}'.format(env.site_profile, env.builddir, env.site_profile))
else:
with fab_cd(role, env.builddir):
fab_run(role, 'git clone {} {}'.format(env.site_profile_repo, env.site_profile))
fab_run(role, 'git clone --branch={} {} {}'.format(env.site_profile_branch, env.site_profile_repo, env.site_profile))
print green('{} installation profile cloned in {}/{}'.format(env.site_profile, env.builddir, env.site_profile))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment