Commit 6ad6fb99 authored by Samuel Sirois's avatar Samuel Sirois
Browse files

Check if env.site_profile is a core profile

parent c16aeb80
Pipeline #1057 failed with stages
in 25 seconds
......@@ -46,7 +46,7 @@ def make(action='install'):
drush_opts = "--prepare-install " if action != 'update' else ''
# Update profile codebase
if env.site_profile and env.site_profile != '':
if env.site_profile and env.site_profile != '' and not h.is_core_profile(env.site_profile):
drush_opts += "--contrib-destination=profiles/{} ".format(env.site_profile)
h.update_profile()
......@@ -63,6 +63,7 @@ def make(action='install'):
with h.fab_cd('local', env.site_root):
h.fab_run('local', 'drush make {} {} -y'.format(drush_opts, env.makefile))
@task
@roles('local')
def aliases():
......
......@@ -47,7 +47,15 @@ env.roledefs['local'] = ["{}@{}".format(user_name, host_name)]
env.roledefs['docker'] = ["root@{}".format(env.container_ip)]
env.builddir = path.join(env.workspace, 'build')
env.makefile = path.join(env.builddir, env.site_profile, env.site_profile_makefile)
def is_core_profile(profile_name):
return profile_name in ( 'minimal', 'standard', 'testing' )
if is_core_profile(env.site_profile):
env.makefile = path.join(env.builddir, env.site_profile_makefile)
else:
env.makefile = path.join(env.builddir, env.site_profile, env.site_profile_makefile)
env.site_drush_aliases = path.join(env.site_root, 'sites/all/drush')
def fab_run(role="local", cmd="", capture=False):
......
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