-
-
Notifications
You must be signed in to change notification settings - Fork 48
/
default.mk
63 lines (48 loc) · 1.34 KB
/
default.mk
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
# Please update /.templates/php/default.mk and sync:
#
# source scripts/functions.sh && rsync_files
#
SHELL := /usr/bin/env bash
PHP_SOURCE_FILES = $(shell find . -name "*.php")
### COMMON stuff for all platforms
BERP_VERSION = 1.3.0
BERP_GRAMMAR = gherkin.berp
define berp-generate-parser =
-! dotnet tool list --tool-path /usr/bin | grep "berp\s*$(BERP_VERSION)" && dotnet tool update Berp --version $(BERP_VERSION) --tool-path /usr/bin
berp -g $(BERP_GRAMMAR) -t $< -o $@ --noBOM
endef
### Common targets for all functionalities implemented on php
default: .tested
.PHONY: default
pre-release: update-version update-dependencies default
.PHONY: pre-release
update-version:
ifdef NEW_VERSION
# no-op: composer rely on git tags
endif
.PHONY: update-version
update-dependencies:
composer update ${COMPOSER_FLAGS}
.PHONY: update-dependencies
publish:
# no-op: composer will rely on the subrepo tag
.PHONY: publish
post-release:
# no-op
.PHONY: post-release
clean:
rm -rf .tested .deps .codegen
rm -rf vendor composer.lock
.PHONY: clean
.tested: .deps $(PHP_SOURCE_FILES)
vendor/bin/php-cs-fixer --dry-run --diff fix
# Disabled: See https://github.com/cucumber/common/pull/2095
# vendor/bin/psalm --no-cache
vendor/bin/phpunit
touch $@
.deps: vendor .codegen
touch $@
.codegen:
touch $@
vendor: composer.json
composer update ${COMPOSER_FLAGS}