-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
34 lines (27 loc) · 1.07 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
ifndef APP_ENV
include .env
endif
###> symfony/framework-bundle ###
cache-clear:
@test -f bin/console && bin/console cache:clear --no-warmup || rm -rf var/cache/*
.PHONY: cache-clear
cache-warmup: cache-clear
@test -f bin/console && bin/console cache:warmup || echo "cannot warmup the cache (needs symfony/console)"
.PHONY: cache-warmup
CONSOLE=bin/console
sf_console:
@test -f $(CONSOLE) || printf "Run \033[32mcomposer require cli\033[39m to install the Symfony console.\n"
@exit
serve_as_sf: sf_console
@test -f $(CONSOLE) && $(CONSOLE)|grep server:start > /dev/null || ${MAKE} serve_as_php
@$(CONSOLE) server:start || exit 0
@printf "Quit the server with \033[32;49mbin/console server:stop.\033[39m\n"
serve_as_php:
@printf "\033[32;49mServer listening on http://127.0.0.1:8000\033[39m\n";
@printf "Quit the server with CTRL-C.\n"
@printf "Run \033[32mcomposer require symfony/web-server-bundle\033[39m for a better web server\n"
php -S 127.0.0.1:8000 -t web
serve:
@${MAKE} serve_as_sf
.PHONY: sf_console serve serve_as_sf serve_as_php
###< symfony/framework-bundle ###