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
b8dbb7aa
Commit
b8dbb7aa
authored
Mar 16, 2016
by
Emmanuel Milou
Browse files
Use conf directory instead of deploy dir
parent
0447d794
Changes
1
Hide whitespace changes
Inline
Side-by-side
fabfile.py
View file @
b8dbb7aa
...
...
@@ -398,14 +398,14 @@ def copy_ssh_keys(role='local', ):
"""
set_env
(
role
)
copy
=
True
if
fab_exists
(
role
,
'{}/
deploy
/id_rsa.pub'
.
format
(
WORKSPACE
)):
if
confirm
(
red
(
'There is a public SSH key in your
deploy
directory Say [Y] to keep this key, say [n] to '
if
fab_exists
(
role
,
'{}/
conf
/id_rsa.pub'
.
format
(
WORKSPACE
)):
if
confirm
(
red
(
'There is a public SSH key in your
conf
directory Say [Y] to keep this key, say [n] to '
'overwrite the key'
)):
copy
=
False
with
fab_cd
(
role
,
WORKSPACE
):
if
copy
:
fab_run
(
role
,
'cp ~/.ssh/id_rsa.pub
deploy
/'
)
fab_run
(
role
,
'cp ~/.ssh/id_rsa.pub
conf
/'
)
print
(
green
(
'Public SSH key copied successful'
))
else
:
print
(
red
(
'Keeping the existing public SSH key'
))
...
...
@@ -521,7 +521,7 @@ def drush_config(role='local'):
# Create aliases
if
fab_exists
(
role
,
'{}/aliases.drushrc.php'
.
format
(
DRUSH_ALIASES
)):
fab_run
(
role
,
'rm aliases.drushrc.php'
)
fab_run
(
role
,
'ln -s {}/
deploy
/aliases.drushrc.php .'
.
format
(
WORKSPACE
))
fab_run
(
role
,
'ln -s {}/
conf
/aliases.drushrc.php .'
.
format
(
WORKSPACE
))
# Download other drush commands
if
not
fab_exists
(
role
,
'{}/po-import'
.
format
(
DRUSH_ALIASES
)):
fab_run
(
role
,
'git clone git@gitlab.savoirfairelinux.com:drupal/drupalizer.git'
)
...
...
@@ -561,7 +561,7 @@ def copy_settings(role='docker', site_env=SITE_ENVIRONMENT):
"""
set_env
(
role
)
fab_run
(
role
,
'cp {}/
deploy
/env/settings.{}.php {}/sites/default/settings.{}.php'
.
format
(
WORKSPACE
,
site_env
,
DRUPAL_ROOT
,
'cp {}/
conf
/env/settings.{}.php {}/sites/default/settings.{}.php'
.
format
(
WORKSPACE
,
site_env
,
DRUPAL_ROOT
,
site_env
))
print
green
(
'settings.{}.php copied in "sites/default".'
.
format
(
site_env
))
...
...
Write
Preview
Markdown
is supported
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