-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
42 lines (29 loc) · 1.28 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
-include .env
CURRENT_UID ?= $(shell id -u)
DOCKER_UP_OPTIONS ?=
.PHONY: install docker-up docker-stop docker-downvendors
install: vendors
docker-up: .docker-build data docker-compose.override.yml
CURRENT_UID=$(CURRENT_UID) docker-compose up $(DOCKER_UP_OPTIONS)
docker-stop:
CURRENT_UID=$(CURRENT_UID) docker-compose stop
docker-down:
CURRENT_UID=$(CURRENT_UID) docker-compose down
.docker-build: docker-compose.yml docker-compose.override.yml $(shell find docker -type f)
CURRENT_UID=$(CURRENT_UID) ENABLE_XDEBUG=$(ENABLE_XDEBUG) docker-compose build
touch .docker-build
docker-compose.override.yml:
cp docker-compose.override.yml-dist docker-compose.override.yml
vendors:
CURRENT_UID=$(CURRENT_UID) ENABLE_XDEBUG=$(ENABLE_XDEBUG) docker-compose run event make vendor
data:
mkdir data
mkdir data/composer
composer.phar:
$(eval EXPECTED_SIGNATURE = "$(shell wget -q -O - https://composer.github.io/installer.sig)")
$(eval ACTUAL_SIGNATURE = "$(shell php -r "copy('https://getcomposer.org/installer', 'composer-setup.php'); echo hash_file('SHA384', 'composer-setup.php');")")
@if [ "$(EXPECTED_SIGNATURE)" != "$(ACTUAL_SIGNATURE)" ]; then echo "Invalid signature"; exit 1; fi
php composer-setup.php
rm composer-setup.php
vendor: composer.phar composer.lock
php composer.phar install