-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
84 lines (62 loc) · 1.95 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# customization
PACKAGE_NAME = icanboogie/cldr
PHPUNIT = vendor/bin/phpunit
CACHE_DIR = .cldr-cache
# do not edit the following lines
vendor:
@composer install
# testing
.PHONY: test-dependencies
test-dependencies: vendor test-cleanup
.PHONY: test
test: test-dependencies
@$(PHPUNIT)
.PHONY: test-coverage
test-coverage: test-dependencies
@mkdir -p build/coverage
@XDEBUG_MODE=coverage $(PHPUNIT) --coverage-html build/coverage
.PHONY: test-coveralls
test-coveralls: test-dependencies
@mkdir -p build/logs
@XDEBUG_MODE=coverage $(PHPUNIT) --coverage-clover build/logs/clover.xml
.PHONY: test-cleanup
test-cleanup:
@rm -f $(CACHE_DIR)/*
.PHONY: test-container
test-container: test-container-81
.PHONY: test-container-81
test-container-81:
@-docker-compose run --rm app81 bash
@docker-compose down -v
.PHONY: test-container-82
test-container-82:
@-docker-compose run --rm app82 bash
@docker-compose down -v
.PHONY: lint
lint:
@XDEBUG_MODE=off phpcs -s
@XDEBUG_MODE=off vendor/bin/phpstan --memory-limit=-1
#
# Generate
#
GENERATE=./generator/generate
.PHONY=generate
generate: \
src/Core/LocaleData.php \
src/General/Transforms/HasContextTransforms.php \
src/Numbers/CurrencyData.php \
src/Supplemental/Territory/TerritoryData.php \
src/Supplemental/Units/SequenceCompanion.php \
src/Supplemental/Units/UnitsCompanion.php
src/Core/LocaleData.php: generator/src/Command/GenerateLocaleData.php
$(GENERATE) $@
src/General/Transforms/HasContextTransforms.php: generator/src/Command/GenerateHasContextTransforms.php
$(GENERATE) $@
src/Numbers/CurrencyData.php: generator/src/Command/GenerateCurrencyData.php
$(GENERATE) $@
src/Supplemental/Territory/TerritoryData.php: generator/src/Command/GenerateTerritoryData.php
$(GENERATE) $@
src/Supplemental/Units/SequenceCompanion.php: generator/src/Command/GenerateSequenceCompanion.php
$(GENERATE) $@
src/Supplemental/Units/UnitsCompanion.php: generator/src/Command/GenerateUnitsCompanion.php
$(GENERATE) $@