Skip to content

Commit

Permalink
Merge pull request #52 from koskinpark/master
Browse files Browse the repository at this point in the history
improvements for makefile, fix of make dev command
  • Loading branch information
jbguerraz authored Oct 9, 2018
2 parents 9dca7b9 + 48c783b commit bbe694a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
20 changes: 16 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Add utility functions and scripts to the container
include scripts/makefile/*.mk

.PHONY: all up down cex cim prepare install si exec info phpcs phpcbf
.PHONY: all up down cex cim prepare install si exec info phpcs phpcbf drush

# Read project name from .env file
$(shell false | cp -i \.env.default \.env 2>/dev/null)
Expand Down Expand Up @@ -158,11 +158,23 @@ lint:

dev:
@echo "Dev tasks..."
$(call php, chmod -R 777 sites/default/files)
$(call php, cp sites/default/default.services.yml sites/default/services.yml)
$(call php, cp sites/example.settings.local.php sites/default/settings.local.php)
$(call php, composer install --prefer-dist -o)
$(call php-0, chmod -R 777 web/sites/default)
$(call php, cp web/sites/default/default.services.yml web/sites/default/services.yml)
$(call php, sed -i -e 's/debug: false/debug: true/g' web/sites/default/services.yml)
$(call php, cp web/sites/example.settings.local.php web/sites/default/settings.local.php)
$(call php, drush -y config-set system.performance css.preprocess 0)
$(call php, drush -y config-set system.performance js.preprocess 0)
$(call php, drush en devel devel_generate webform_devel kint -y)
$(call php, drush pm-uninstall dynamic_page_cache page_cache -y)
$(call php, drush cr)

drush:
$(call php, drush $(filter-out $@,$(MAKECMDGOALS)))

# https://stackoverflow.com/a/6273809/1826109
%:
@:

## Check codebase with phpcs sniffers to make sure it conforms https://www.drupal.org/docs/develop/standards
phpcs:
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ For Linux install <a href="https://docs.docker.com/compose/install/" target="_bl
* `make chown` - Change permissions inside container. Use it in case you can not access files in _build_. folder from your machine.
* `make exec` - docker exec into php container.
* `make exec0` - docker exec into php container as root.
* `make devel` - Devel + kint setup, and config for Twig debug mode.
* `make dev` - Devel + kint setup, and config for Twig debug mode, disable aggregation.
* `make drush [command]` - execute drush command.
* `make phpcs` - check codebase with `phpcs` sniffers to make sure it conforms https://www.drupal.org/docs/develop/standards.
* `make phpcbf` - fix codebase according to Drupal standards https://www.drupal.org/docs/develop/standards.
* `make cex` - executes config export to `config/sync` directory.
Expand Down

0 comments on commit bbe694a

Please sign in to comment.