forked from flix-tech/avro-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (34 loc) · 1.2 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
# no buildin rules and variables
MAKEFLAGS =+ -rR --warn-undefined-variables
.PHONY: composer-install composer-update examples docker run
COMPOSER ?= bin/composer.phar
COMPOSER_VERSION ?= 2.5.4
PHP ?= bin/php
PHP_VERSION ?= 8.2
XDEBUG_VERSION ?= 3.2.0
export
docker:
docker build \
--build-arg PHP_VERSION=$(PHP_VERSION) \
--build-arg XDEBUG_VERSION=$(XDEBUG_VERSION) \
-t avro-php:$(PHP_VERSION) \
-f Dockerfile \
.
composer-install:
PHP_VERSION=$(PHP_VERSION) $(PHP) $(COMPOSER) install --no-interaction --no-progress --no-suggest --no-scripts
composer-update:
PHP_VERSION=$(PHP_VERSION) $(PHP) $(COMPOSER) update --no-interaction --no-progress --no-suggest --no-scripts
phpunit:
@mkdir -p build/tmp build/share/test/schemas build/build/interop/data
@chmod -R a+w build
PHP_VERSION=$(PHP_VERSION) $(PHP) vendor/bin/phpunit --coverage-text test/AllTests.php
run:
PHP_VERSION=$(PHP_VERSION) $(PHP) $(ARGS)
examples:
PHP_VERSION=$(PHP_VERSION) $(PHP) examples/*
install-phars:
curl https://getcomposer.org/download/$(COMPOSER_VERSION)/composer.phar -o bin/composer.phar -LR -z bin/composer.phar
chmod a+x bin/composer.phar
install: install-phars docker composer-install
clean:
rm -r build/*