Skip to content

Commit

Permalink
Disable aggregation, name check, and reorder tasks
Browse files Browse the repository at this point in the history
- Enable aggregation
- Use the development.serivces.yml
- Check is the name argument has a '/'
- Run composer install at the end of other tasks don't fail if it does
  • Loading branch information
skippednote committed Jul 9, 2020
1 parent 2bdbd3a commit 64024c3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
21 changes: 16 additions & 5 deletions axltempl/drupal.py
Expand Up @@ -95,6 +95,11 @@ def main(
Create a Drupal site template with NAME.
Where NAME is the name of your application package (e.g., axelerant/site)
"""
if "/" not in name:
util.write_error(
"The name argument should consist of vendor name and project name, separated by /."
)

if not no_install:
ensure_memory_limit()

Expand All @@ -111,11 +116,6 @@ def main(
cache_service=cache,
)

if not no_install:
run_composer_install()
else:
util.write_info("Remember to run 'composer install' manually.")

settings_file = ensure_settings_file(docroot)
modify_settings_file(
settings_file, "$settings['config_sync_directory'] = '../config/sync';",
Expand All @@ -133,6 +133,11 @@ def main(
util.write_info("Adding GitLab support...")
gitlab.generate_gitlab_files(docroot)

if not no_install:
run_composer_install()
else:
util.write_info("Remember to run 'composer install' manually.")

os.chdir("..")
return 0

Expand Down Expand Up @@ -350,6 +355,12 @@ def write_settings_env(docroot):
modify_settings_file(
settings_file, "include $app_root . '/' . $site_path . '/settings.env.php';"
)
util.copy_package_file(
"files/lando/settings.lando.php", docroot + "/sites/default/settings.lando.php"
)
modify_settings_file(
settings_file, "include $app_root . '/' . $site_path . '/settings.lando.php';"
)


def modify_settings_file(settings_file, line):
Expand Down
3 changes: 3 additions & 0 deletions axltempl/files/lando/settings.lando.php
Expand Up @@ -16,3 +16,6 @@
];

$settings['hash_salt'] = md5(getenv('LANDO_HOST_IP'));
$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';
$config['system.performance']['css']['preprocess'] = FALSE;
$config['system.performance']['js']['preprocess'] = FALSE;

0 comments on commit 64024c3

Please sign in to comment.