blob: 9ded601b28da85bf4a2ce077178dbef51ce113e3 (
plain)
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
|
# Makefile for building the project
app_name=$(notdir $(CURDIR))
build_directory=$(CURDIR)/build/artifacts/source
package_name=$(build_directory)/$(app_name)
all: build
.PHONY: build
build:
make composer
make npm
.PHONY: composer
composer:
curl -sS https://getcomposer.org/installer | php
php composer.phar install --prefer-dist
php composer.phar update --prefer-dist
rm -f composer.phar
.PHONY: npm
npm:
cd js && npm run build
.PHONY: clean
clean:
rm -rf ./build
.PHONY: dist
dist:
make clean
make build
make test
mkdir -p $(build_directory)
tar cvzf $(package_name).tar.gz ../$(app_name) \
--exclude-vcs \
--exclude=../$(app_name)/build \
--exclude=../$(app_name)/js/node_modules \
.PHONY: test
test:
cd js && npm run test
phpunit -c phpunit.xml
phpunit -c phpunit.integration.xml
|