]> gitweb.fluxo.info Git - templater.git/commitdiff
Drupal 8: Makefile: fixes
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 14 Nov 2017 20:14:55 +0000 (18:14 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 14 Nov 2017 20:14:55 +0000 (18:14 -0200)
share/templater/drupal8/files/Makefile

index a24fa507bfebdf98cd6c7223a9f05c3a50d49cc0..8c226bbcf29c416b09e2ce3cf07cabdf3c0266fa 100644 (file)
@@ -72,8 +72,8 @@ default_settings:
        test -s settings.dev.php || cp $(DRUPAL)/sites/default/default.settings.php settings.dev.php
        test -s services.dev.yml || cp $(DRUPAL)/sites/default/default.services.yml services.dev.yml
 
-# Setup drupal settings
-settings: default_settings
+# Custom settings
+custom_settings:
        #test -s   $(DRUPAL)/sites/sites.php                      || cp sites.php              $(DRUPAL)/sites/sites.php
        #mkdir -p  $(DRUPAL)/sites/$(PROJECT)
        #test -s   $(DRUPAL)/sites/$(PROJECT)/settings.$(ENV).php || cp settings.dev.php       $(DRUPAL)/sites/$(PROJECT)/settings.$(ENV).php
@@ -82,14 +82,17 @@ settings: default_settings
        #test -s   $(DRUPAL)/sites/$(PROJECT)/services.yml        || ln -s services.$(ENV).yml $(DRUPAL)/sites/$(PROJECT)/services.yml
        #chmod 640 $(DRUPAL)/sites/$(PROJECT)/settings.php
        #chmod 640 $(DRUPAL)/sites/$(PROJECT)/services.yml
-       test -s   $(DRUPAL)/sites/sites.php || sudo cp sites.php         $(DRUPAL)/sites/sites.php
-       test -s   settings.$(ENV).php       || cp settings.dev.php       settings.$(ENV).php
-       test -s   settings.php              || ln -s settings.$(ENV).php settings.php
-       test -s   services.$(ENV).yml       || cp services.dev.yml       services.$(ENV).yml
-       test -s   services.yml              || ln -s services.$(ENV).yml services.yml
+       test -s   settings.$(ENV).php || cp settings.dev.php       settings.$(ENV).php
+       test -s   settings.php        || ln -s settings.$(ENV).php settings.php
+       test -s   services.$(ENV).yml || cp services.dev.yml       services.$(ENV).yml
+       test -s   services.yml        || ln -s services.$(ENV).yml services.yml
        chmod 640 settings.php
        chmod 640 services.yml
 
+# Setup drupal settings
+settings: default_settings custom_settings
+       test -s $(DRUPAL)/sites/sites.php || sudo cp sites.php $(DRUPAL)/sites/sites.php
+
 # Fix ownership
 ownership:
        sudo chown -R $(PROJECT). $(DRUPAL)/sites/$(PROJECT)
@@ -117,8 +120,8 @@ updatedb:
 # Load the database dump, clear the drupal cache and fix image paths
 # See https://www.drupal.org/node/628130
 initdb:
-       test -s sql/dumps/latest && gzip -dc sql/dumps/latest.sql.gz | $(DRUSH) sql-cli || true
-       test -s sql/dumps/latest && $(DRUSH) updatedb -y || true
+       test -s sql/dumps/latest.sql.gz && gzip -dc sql/dumps/latest.sql.gz | $(DRUSH) sql-cli || true
+       test -s sql/dumps/latest.sql.gz && $(DRUSH) updatedb -y || true
 
 # Dump the database
 dumpdb: