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
e79b5bdf
Commit
e79b5bdf
authored
Jun 07, 2016
by
Emmanuel Milou
Browse files
Merge branch '2.x' of gitlab.savoirfairelinux.com:drupal/drupalizer into 2.x
parents
1c69f3c6
d49c82ae
Changes
6
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.adoc
View file @
e79b5bdf
...
...
@@ -6,6 +6,16 @@ This project adheres to http://semver.org/[Semantic Versioning].
== [Unreleased]
=== Fixed
* Site name can now have whitespaces without breaking the shell execution string
=== Added
* Add a Patternlab command to build the static style guide: `fab patternlab.build`.
== 2.0.0 - 2016/05/09
=== Added
* Implements Aegir and standard deployments as Fabric tasks
...
...
README.adoc
View file @
e79b5bdf
...
...
@@ -88,6 +88,16 @@ Those are global project parameters mandatory to Drupalizer.
|===
=== Patternlab settings
|===
|Parameters |Description
|_patternlab_dir_
|The Patternlab directory. Default: _empty_
|===
=== Docker-related settings
|===
...
...
@@ -194,3 +204,7 @@ CAUTION: This command will wipe all the modifications made in the working direct
* _Archive_ the full codebase and the database using drush archive_dump:
$ fab drush.archive_dump
* _Generate_ the guide style:
$ fab patternlab.build
__init__.py
View file @
e79b5bdf
...
...
@@ -2,6 +2,7 @@ import docker
from
deploy
import
*
import
drush
import
behat
import
patternlab
from
.environments
import
e
from
fabric.api
import
task
,
env
,
execute
...
...
default_vars.py
View file @
e79b5bdf
...
...
@@ -29,8 +29,15 @@ env.site_admin_pass = 'admin'
env
.
site_subdir
=
'default'
# PatternLab
# Specify the PatternLab dir is you want the style guide to be generated
env
.
patternlab_dir
=
''
# Database dump
# To enable it, replace the boolean value with the absolute path of a gzipped SQL dump file.
env
.
db_dump
=
False
# Docker
...
...
drush.py
View file @
e79b5bdf
...
...
@@ -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'
,
'
{}
make {} {} -y'
.
format
(
env
.
drush
,
drush_opts
,
env
.
makefile
))
h
.
fab_run
(
'local'
,
'
drush
make {} {} -y'
.
format
(
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 {}
{}
site-install {} {} --db-url=mysql://{}:{}@{}/{} --site-name={} '
'--account-name={} --account-pass={} --sites-subdir={} -y'
.
format
(
apache
,
env
.
drush
,
profile
,
locale
,
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
,
db_user
,
db_pass
,
db_host
,
db_name
,
site_name
,
site_admin_name
,
...
...
patternlab.py
0 → 100644
View file @
e79b5bdf
from
__future__
import
unicode_literals
from
fabric.api
import
task
,
roles
,
env
from
fabric.colors
import
green
import
helpers
as
h
@
task
@
roles
(
'local'
)
def
build
():
"""
Generate the PatternLab static site
"""
role
=
'local'
workspace
=
env
.
docker_workspace
host
=
env
.
site_hostname
site_root
=
env
.
docker_site_root
with
h
.
fab_cd
(
role
,
env
.
patternlab_dir
):
h
.
fab_run
(
role
,
'touch public/styleguide/html/styleguide.html'
)
h
.
fab_run
(
role
,
'php core/builder.php -g'
)
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