-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (38 loc) · 1.78 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
help:
@egrep "^#" Makefile
# target: docker-up|du - Start docker containers
du: docker-up
docker-up:
docker-compose up -d --build
# target: docker-down|dd - Stop docker containers
dd: docker-down
docker-down:
docker-compose down
# target: docker-build|db - Setup PHP & (node)JS dependencies
db: docker-build
docker-build: build-front build-composer
# target: bash-app - Connect into app container
ba: bash-app
bash-app:
docker-compose run --rm php bash
# target: build-front - Build front for prod
build-front:
docker-compose run --rm node sh -c "cd _dev/ && npm install"
docker-compose run --rm node sh -c "cd _dev/ && npm run build"
# target: watch-front - Watch VueJS files and compile when saved
watch-front:
docker-compose run --rm node sh -c "cd _dev/ && npm run watch"
build-composer:
docker-compose run --rm php sh -c "composer install"
# target: tests - Launch the tests/lints suite front and back
tests: test-back test-front
# target: test-back - Launch the tests back
test-back:
docker-compose run --rm php sh -c "vendor/bin/php-cs-fixer fix --dry-run --diff --using-cache=no --diff-format udiff"
docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop; docker run --rm --volumes-from temp-ps -v $PWD:/web/module -e _PS_ROOT_DIR_=/var/www/html --workdir=/web/module phpstan/phpstan analyse --configuration=/web/module/tests/phpstan/phpstan.neon;
# target: test-front - Launch the tests front (does not work linter is not configured)
test-front:
docker-compose run --rm node sh -c "cd _dev/ && npm run lint"
# target: fix-lint
fix-lint:
docker-compose run --rm node sh -c "cd _dev/ && npm run lint --fix"