-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (52 loc) · 1.83 KB
/
Copy pathMakefile
File metadata and controls
67 lines (52 loc) · 1.83 KB
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
# Convenience wrappers around docker compose for the NFE.io PHP SDK.
#
# All targets run inside the docker container, so you do NOT need PHP or
# Composer installed on the host. The first run will build the image
# (~2 minutes); subsequent runs reuse it.
DC := docker compose
RUN := $(DC) run --rm
PHP ?= php
.PHONY: help build install update test test-matrix stan cs cs-fix generate generate-check shell clean
help:
@echo "NFE.io PHP SDK — dev shortcuts (all run via docker compose)"
@echo ""
@echo " make build Build all matrix images (PHP 8.2 / 8.3 / 8.4)"
@echo " make install composer install"
@echo " make update composer update"
@echo " make test Pest under PHP 8.2 (primary)"
@echo " make test-matrix Pest under PHP 8.2, 8.3, AND 8.4"
@echo " make stan PHPStan analyse"
@echo " make cs php-cs-fixer dry-run"
@echo " make cs-fix php-cs-fixer fix (writes changes)"
@echo " make generate Regenerate src/Generated/ from openapi/*.yaml"
@echo " make generate-check Fail if src/Generated/ is out of sync with specs"
@echo " make shell Drop into a bash shell inside the PHP 8.2 container"
@echo " make clean Remove images and the composer-cache volume"
@echo ""
@echo " Override the active service: 'make test PHP=php83'"
build:
$(DC) build
install:
$(RUN) $(PHP) composer install
update:
$(RUN) $(PHP) composer update
test:
$(RUN) $(PHP) composer test
test-matrix:
$(RUN) php composer test
$(RUN) php83 composer test
$(RUN) php84 composer test
stan:
$(RUN) $(PHP) composer stan
cs:
$(RUN) $(PHP) composer cs
cs-fix:
$(RUN) $(PHP) composer cs:fix
generate:
$(RUN) $(PHP) composer generate
generate-check:
$(RUN) $(PHP) composer generate:check
shell:
$(RUN) $(PHP) bash
clean:
$(DC) down --volumes --rmi local