-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
70 lines (58 loc) · 2.24 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
69
# Initialize variables
ifeq ($(OS),Windows_NT)
currentDir = $(patsubst %/,%, $(subst /mnt, ,$(shell wsl wslpath -u $(strip $(dir $(realpath $(lastword $(MAKEFILE_LIST))))))))
userId = $(shell wsl id -u)
groupId = $(shell wsl id -g)
else
currentDir = $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
userId = $(shell id -u)
groupId = $(shell id -g)
endif
user = --user $(userId):$(groupId)
# Install PHP Dependencies via Composer
composer-install:
docker run --rm --name compose-maintainence --interactive \
--volume $(currentDir):/app \
$(user) \
composer:latest install --ignore-platform-reqs --no-scripts
# Install Dev PHP Dependencies via Composer
composer-install-dev:
docker run --rm --name compose-maintainence-dev --interactive \
-v $(currentDir):/app \
$(user) \
composer:latest install --ignore-platform-reqs --no-scripts --dev
# Update Dev PHP Dependencies via Composer
composer-update:
docker run --rm --name compose-maintainence-update --interactive \
--volume $(currentDir):/app \
$(user) \
composer:latest update --ignore-platform-reqs --no-scripts
# list Composer outdated direct
composer-outdated-direct:
docker run --rm --name compose-maintainence-update --interactive \
--volume $(currentDir):/app \
$(user) \
composer:latest outdated -D
# list Composer outdated
composer-outdated:
docker run --rm --name compose-maintainence-update --interactive \
--volume $(currentDir):/app \
$(user) \
composer:latest outdated
# add PHP Dependencies via Composer - usage make composer-add-dep module=module/namehere
composer-add-dep:
docker run --rm --name compose-maintainence-update --interactive \
--volume $(currentDir):/app \
$(user) \
composer:latest require $(module) --ignore-platform-reqs --no-scripts
# add Dev PHP Dependencies via Composer - usage make composer-add-dep-dev module=module/namehere
composer-add-dep-dev:
docker run --rm --name compose-maintainence-update --interactive \
--volume $(currentDir):/app \
$(user) \
composer:latest require $(module) --ignore-platform-reqs --no-scripts --dev
#test
test:
docker run --rm --name test --interactive \
-v $(currentDir):/app \
$(user) jitesoft/phpunit:latest /bin/sh -c "cd /app && vendor/bin/phpunit"