Commit e79b5bdf authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

Merge branch '2.x' of gitlab.savoirfairelinux.com:drupal/drupalizer into 2.x

parents 1c69f3c6 d49c82ae
......@@ -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
......
......@@ -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
......@@ -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
......
......@@ -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
......
......@@ -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,
......
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')
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