]> gitweb.fluxo.info Git - templater.git/commitdiff
Drupal: setup settings.local.php
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 7 Feb 2018 22:04:02 +0000 (20:04 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 7 Feb 2018 22:04:02 +0000 (20:04 -0200)
share/templater/drupal7/files/default.settings.php
share/templater/drupal7/files/settings.local.php [new file with mode: 0644]
share/templater/drupal7/setup
share/templater/drupal8/files/default.settings.php
share/templater/drupal8/files/settings.local.php [new file with mode: 0644]
share/templater/drupal8/setup

index a0b8a36238882d8f0ca91adf986440f7204da06a..283c353f0e1fd5c4c5844b69ee70b484ceae9897 100644 (file)
@@ -636,3 +636,17 @@ $databases['default']['default'] = array(
   'host'     => 'localhost',
   'prefix'   => '',
 );
+
+/**
+ * Load local development override configuration, if available.
+ *
+ * Use settings.local.php to override variables on secondary (staging,
+ * development, etc) installations of this site. Typically used to disable
+ * caching, JavaScript/CSS compression, re-routing of outgoing emails, and
+ * other things that should not happen on development and testing sites.
+ *
+ * Keep this code block at the end of this file to take full effect.
+ */
+if (file_exists(__DIR__ . '/settings.local.php')) {
+  include __DIR__ . '/settings.local.php';
+}
diff --git a/share/templater/drupal7/files/settings.local.php b/share/templater/drupal7/files/settings.local.php
new file mode 100644 (file)
index 0000000..5f4746f
--- /dev/null
@@ -0,0 +1 @@
+<?php // Put your local customizations here
index 70ebe0763ca61a51362e1eb811e334db446cfefe..ce38946ddc7b7d9656e089f4109fd59966620fe8 100755 (executable)
@@ -15,10 +15,11 @@ function templater_drupal7 {
     templater_echo "Setting up Drupal 7..."
 
     if [ ! -e ".gitignore" ] || ! grep -q "^settings.php" .gitignore; then
-      echo settings.php      >> .gitignore
-      echo settings.prod.php >> .gitignore
-      echo files             >> .gitignore
-      echo sql               >> .gitignore
+      echo settings.php       >> .gitignore
+      echo settings.local.php >> .gitignore
+      echo settings.prod.php  >> .gitignore
+      echo files              >> .gitignore
+      echo sql                >> .gitignore
     fi
 
     if [ ! -e "settings.dev.php" ]; then
@@ -28,6 +29,10 @@ function templater_drupal7 {
 
     ln -sf settings.dev.php settings.php
 
+    if [ ! -e "settings.local.php" ]; then
+      cp $SHARE/drupal7/files/settings.local.php settings.local.php
+    fi
+
     templater_install_makefile $SHARE/drupal7/files/Makefile.drupal7
 
     if [ ! -e "drupal.make.yml" ]; then
index bf3bd202b8dfd88a886014c7703ce90515de278f..59afc6c78560e8fed20934a8f718bc9a66ef690a 100644 (file)
@@ -770,21 +770,6 @@ $settings['file_scan_ignore_directories'] = [
  */
 $settings['entity_update_batch_size'] = 50;
 
-/**
- * Load local development override configuration, if available.
- *
- * Use settings.local.php to override variables on secondary (staging,
- * development, etc) installations of this site. Typically used to disable
- * caching, JavaScript/CSS compression, re-routing of outgoing emails, and
- * other things that should not happen on development and testing sites.
- *
- * Keep this code block at the end of this file to take full effect.
- */
-#
-# if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) {
-#   include $app_root . '/' . $site_path . '/settings.local.php';
-# }
-
 /**
  * Basic config set by templater - https://templater.fluxo.info
  */
@@ -803,3 +788,17 @@ $config_directories['sync']        = 'sites/default/config/sync';
 $settings['trusted_host_patterns'] = array(
   '^localhost$',
 );
+
+/**
+ * Load local development override configuration, if available.
+ *
+ * Use settings.local.php to override variables on secondary (staging,
+ * development, etc) installations of this site. Typically used to disable
+ * caching, JavaScript/CSS compression, re-routing of outgoing emails, and
+ * other things that should not happen on development and testing sites.
+ *
+ * Keep this code block at the end of this file to take full effect.
+ */
+if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) {
+  include $app_root . '/' . $site_path . '/settings.local.php';
+}
diff --git a/share/templater/drupal8/files/settings.local.php b/share/templater/drupal8/files/settings.local.php
new file mode 100644 (file)
index 0000000..5f4746f
--- /dev/null
@@ -0,0 +1 @@
+<?php // Put your local customizations here
index 85f0b7fda77ba0a4b26911af618c5ef79e0c080d..d99489fe428d8ccbacd6e1e2ba67ac338eeeab13 100755 (executable)
@@ -15,11 +15,12 @@ function templater_drupal8 {
     templater_echo "Setting up Drupal 8..."
 
     if [ ! -e ".gitignore" ] || ! grep -q "^settings.php" .gitignore; then
-      echo settings.php      >> .gitignore
-      echo settings.prod.php >> .gitignore
-      echo services.yml      >> .gitignore
-      echo files             >> .gitignore
-      echo sql               >> .gitignore
+      echo settings.php       >> .gitignore
+      echo settings.local.php >> .gitignore
+      echo settings.prod.php  >> .gitignore
+      echo services.yml       >> .gitignore
+      echo files              >> .gitignore
+      echo sql                >> .gitignore
     fi
 
     if [ ! -e "settings.dev.php" ]; then
@@ -29,6 +30,10 @@ function templater_drupal8 {
 
     ln -sf settings.dev.php settings.php
 
+    if [ ! -e "settings.local.php" ]; then
+      cp $SHARE/drupal7/files/settings.local.php settings.local.php
+    fi
+
     if [ ! -e "services.yml" ]; then
       cp $SHARE/drupal8/files/default.services.yml services.dev.yml
       #cp $SHARE/drupal8/files/default.services.yml .