Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Drupal
drupalizer
Commits
6ad6fb99
Commit
6ad6fb99
authored
Oct 24, 2016
by
Samuel Sirois
Browse files
Check if env.site_profile is a core profile
parent
c16aeb80
Pipeline
#1057
failed with stages
in 25 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
drush.py
View file @
6ad6fb99
...
...
@@ -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
():
...
...
helpers.py
View file @
6ad6fb99
...
...
@@ -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
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment