-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
68 lines (52 loc) · 1.83 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
.DEFAULT_GOAL := help
SHELL=/bin/bash
# Configuration
# ¯¯¯¯¯¯¯¯¯¯¯¯¯
SYLIUS_FOLDER=sylius
PHP_VERSION=7.3
DOMAINS=apps/${SYLIUS_FOLDER}:sylius-store
SYLIUS_FIXTURES_SUITE=default
BASH_CONTAINER=php
export USER_UID=$(shell id -u)
DC_DIR=infra/dev
DC_PREFIX=sylius
APP_ENV=dev
ifndef DC_PREFIX
$(error Please define DC_PREFIX before running make)
endif
### QUICK
# ¯¯¯¯¯¯¯
up start: docker.up symfony.proxy.start symfony.server.start ## Up
down: docker.down symfony.proxy.stop symfony.server.stop ## Down
stop: docker.stop symfony.proxy.stop symfony.server.stop ## Stop
logs: docker.logs symfony.server.log ## Logs
### PROJECT
# ¯¯¯¯¯¯¯¯¯
coffee: ## Launch it, and take coffee ☕️
${MAKE} project.infra.update
mkdir -p apps/${SYLIUS_FOLDER}
rm -f .php-version
echo "${PHP_VERSION}" > .php-version
echo "memory_limit=-1" > php.ini
${MAKE} composer.create-project
mv .php-version apps/${SYLIUS_FOLDER}/
mv php.ini apps/${SYLIUS_FOLDER}/
${MAKE} apply-dist
${MAKE} SYMFONY_ENV=dev project.install
project.install: docker.up app.start composer.install sylius.install theme.assets.install theme.install ## Install the project (⚠ Reset database)
project.infra.update: ## Update the Docker infrastructure
${MAKE} PULL_FROM=1 docker.pull docker.build docker.up
apply-dist: ## Copy dist files
mkdir -p apps/${SYLIUS_FOLDER}
cp -Rv dist/dev/.env* apps/${SYLIUS_FOLDER}
cp -Rv dist/dev/* apps/${SYLIUS_FOLDER}
add-symfony-bin: ## Download Symfony Binary
curl -sS https://get.symfony.com/cli/installer | bash
include resources/makefiles/application.mk
include resources/makefiles/symfony.mk
include resources/makefiles/sylius.mk
include resources/makefiles/theming.mk
include resources/makefiles/composer.mk
include resources/makefiles/test.mk
include resources/makefiles/docker.mk
include resources/makefiles/help.mk