Skip to content

Commit b6ae313

Browse files
authored
Merge pull request #318 from WyriHaximus/renovate/update-packagist-wyrihaximus-makefiles-0-7-5
Update dependency wyrihaximus/makefiles to ^0.7.5
2 parents fc9db4b + f699ee5 commit b6ae313

File tree

5 files changed

+54
-41
lines changed

5 files changed

+54
-41
lines changed

Makefile

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ SHELL=bash
33

44
.PHONY: *
55

6+
DOCKER_AVAILABLE=$(shell ((command -v docker >/dev/null 2>&1) && echo 0 || echo 1))
67
CONTAINER_REGISTRY_REPO="ghcr.io/wyrihaximusnet/php"
7-
COMPOSER_SHOW_EXTENSION_LIST_PROD=$(shell ((command -v docker >/dev/null 2>&1) && docker run --rm -v "`pwd`:`pwd`" -w `pwd` ${CONTAINER_REGISTRY_REPO}:8.4-nts-alpine-slim-dev composer show -t) | grep -o "\-\-\(ext-\).\+" | sort | uniq | cut -d- -f4- | tr -d '\n' | grep . | sed '/^$$/d' | xargs | sed -e 's/ /, /g' | tr -cd '[:alnum:],' | sed 's/.$$//')
8-
COMPOSER_SHOW_EXTENSION_LIST_DEV=$(shell ((command -v docker >/dev/null 2>&1) && docker run --rm -v "`pwd`:`pwd`" -w `pwd` ${CONTAINER_REGISTRY_REPO}:8.4-nts-alpine-slim-dev composer show -s) | grep -o "\(ext-\).\+" | sort | uniq | cut -d- -f2- | cut -d" " -f1 | xargs | sed -e 's/ /, /g' | tr -cd '[:alnum:],')
8+
COMPOSER_SHOW_EXTENSION_LIST_PROD=$(shell (((command -v composer >/dev/null 2>&1) && composer show -t --no-plugins) || docker run --rm -v "`pwd`:`pwd`" -w `pwd` ${CONTAINER_REGISTRY_REPO}:8.4-nts-alpine-slim-dev composer show -t --no-plugins) | grep -o "\-\-\(ext-\).\+" | sort | uniq | cut -d- -f4- | tr -d '\n' | grep . | sed '/^$$/d' | xargs | sed -e 's/ /, /g' | tr -cd '[:alnum:],' | sed 's/.$$//')
9+
COMPOSER_SHOW_EXTENSION_LIST_DEV=$(shell (((command -v composer >/dev/null 2>&1) && composer show -s --no-plugins) || docker run --rm -v "`pwd`:`pwd`" -w `pwd` ${CONTAINER_REGISTRY_REPO}:8.4-nts-alpine-slim-dev composer show -s --no-plugins) | grep -o "\(ext-\).\+" | sort | uniq | cut -d- -f2- | cut -d" " -f1 | xargs | sed -e 's/ /, /g' | tr -cd '[:alnum:],')
910
COMPOSER_SHOW_EXTENSION_LIST=$(shell echo "${COMPOSER_SHOW_EXTENSION_LIST_PROD},${COMPOSER_SHOW_EXTENSION_LIST_DEV}")
1011
SLIM_DOCKER_IMAGE=$(shell php -r 'echo count(array_intersect(["gd", "vips"], explode(",", "${COMPOSER_SHOW_EXTENSION_LIST}"))) > 0 ? "" : "-slim";')
1112
NTS_OR_ZTS_DOCKER_IMAGE=$(shell php -r 'echo count(array_intersect(["parallel"], explode(",", "${COMPOSER_SHOW_EXTENSION_LIST}"))) > 0 ? "zts" : "nts";')
1213
PHP_VERSION:=$(shell (((command -v docker >/dev/null 2>&1) && docker run --rm -v "`pwd`:`pwd`" ${CONTAINER_REGISTRY_REPO}:8.4-nts-alpine-slim php -r "echo json_decode(file_get_contents('`pwd`/composer.json'), true)['config']['platform']['php'];") || echo "8.3") | php -r "echo str_replace('|', '.', explode('.', implode('|', explode('.', stream_get_contents(STDIN), 2)), 2)[0]);")
1314
CONTAINER_NAME=$(shell echo "${CONTAINER_REGISTRY_REPO}:${PHP_VERSION}-${NTS_OR_ZTS_DOCKER_IMAGE}-alpine${SLIM_DOCKER_IMAGE}-dev")
14-
COMPOSER_CACHE_DIR=$(shell (command -v docker >/dev/null 2>&1) && docker run --rm -v "`pwd`:`pwd`" -w `pwd` ${CONTAINER_REGISTRY_REPO}:8.4-nts-alpine-slim-dev composer config --global cache-dir -q || echo ${HOME}/.composer-php/cache)
15+
COMPOSER_CACHE_DIR=$(shell (command -v composer >/dev/null 2>&1) && composer config --global cache-dir -q || echo ${HOME}/.composer-php/cache)
1516
COMPOSER_CONTAINER_CACHE_DIR=$(shell ((command -v docker >/dev/null 2>&1) && docker run --rm -it ${CONTAINER_NAME} composer config --global cache-dir -q) || echo ${HOME}/.composer-php/cache)
1617

1718
ifneq ("$(wildcard /.you-are-in-a-wyrihaximus.net-php-docker-image)","")
@@ -23,12 +24,16 @@ endif
2324
ifeq ("$(IN_DOCKER)","TRUE")
2425
DOCKER_RUN:=
2526
else
26-
DOCKER_RUN:=docker run --rm -it \
27-
-v "`pwd`:`pwd`" \
28-
-v "${COMPOSER_CACHE_DIR}:${COMPOSER_CONTAINER_CACHE_DIR}" \
29-
-w "`pwd`" \
30-
-e OTEL_PHP_FIBERS_ENABLED="true" \
31-
"${CONTAINER_NAME}"
27+
ifeq ($(DOCKER_AVAILABLE),0)
28+
DOCKER_RUN:=docker run --rm -it \
29+
-v "`pwd`:`pwd`" \
30+
-v "${COMPOSER_CACHE_DIR}:${COMPOSER_CONTAINER_CACHE_DIR}" \
31+
-w "`pwd`" \
32+
-e OTEL_PHP_FIBERS_ENABLED="true" \
33+
"${CONTAINER_NAME}"
34+
else
35+
DOCKER_RUN:=
36+
endif
3237
endif
3338

3439
ifneq (,$(findstring icrosoft,$(shell cat /proc/version)))
@@ -38,7 +43,7 @@ else
3843
endif
3944

4045
all: ## Runs everything ####
41-
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | grep -v "####" | awk 'BEGIN {FS = ":.*?## "}; {printf "%s\n", $$1}' | xargs -o $(MAKE)
46+
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | grep -v "##*I*##" | grep -v "####" | awk 'BEGIN {FS = ":.*?## "}; {printf "%s\n", $$1}' | xargs -o $(MAKE)
4247

4348
on-install-or-update: ## Runs everything ####
4449
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | grep -E "##\*(I|ILH)\*##" | awk 'BEGIN {FS = ":.*?## "}; {printf "%s\n", $$1}' | xargs -o $(MAKE)
@@ -69,10 +74,10 @@ unit-testing-raw: ## Run tests ##*D*## ####
6974
php vendor/phpunit/phpunit/phpunit --colors=always -c ./etc/qa/phpunit.xml --coverage-text --coverage-html ./var/tests-unit-coverage-html --coverage-clover ./var/tests-unit-clover-coverage.xml
7075

7176
mutation-testing: ## Run mutation testing ##*LCH*##
72-
$(DOCKER_RUN) vendor/bin/infection --ansi --log-verbosity=all --ignore-msi-with-no-mutations --threads=$(THREADS) || (cat ./var/infection.log && false)
77+
$(DOCKER_RUN) vendor/bin/infection --ansi --log-verbosity=all --ignore-msi-with-no-mutations --configuration=./etc/qa/infection.json5 --threads=$(THREADS) || (cat ./var/infection.log && false)
7378

7479
mutation-testing-raw: ## Run mutation testing ####
75-
vendor/bin/infection --ansi --log-verbosity=all --ignore-msi-with-no-mutations --threads=$(THREADS) || (cat ./var/infection.log && false)
80+
vendor/bin/infection --ansi --log-verbosity=all --ignore-msi-with-no-mutations --configuration=./etc/qa/infection.json5 --threads=$(THREADS) || (cat ./var/infection.log && false)
7681

7782
composer-require-checker: ## Ensure we require every package used in this package directly ##*C*##
7883
$(DOCKER_RUN) vendor/bin/composer-require-checker --ignore-parse-errors --ansi -vvv --config-file=./etc/qa/composer-require-checker.json
@@ -118,3 +123,14 @@ task-list-ci-locked: ## CI: Generate a JSON array of jobs to run against the loc
118123
task-list-ci-high: ## CI: Generate a JSON array of jobs to run against the highest dependencies on the primary threading target
119124
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | grep -E "##\*(H|LH|LCH|LC)\*##" | grep -v "###" | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "%s\n", $$1}' | jq --raw-input --slurp -c 'split("\n")| .[0:-1]'
120125

126+
127+
## Temporary set of migrations to get all my repos in shape
128+
php-migrations-move-infection: #### Move infection.json.dist to etc/qa/infection.json5 ##*I*##
129+
($(DOCKER_RUN) mv infection.json.dist etc/qa/infection.json5 || true)
130+
131+
php-migrations-remove-phpunit-config-dir-from-infection: #### Drop XXX from etc/qa/infection.json5 ##*I*##
132+
($(DOCKER_RUN) php -r '$$infectionFile = "etc/qa/infection.json5"; if (!file_exists($$infectionFile)) {exit;} $$json = json_decode(file_get_contents($$infectionFile), true); if (!is_array($$json)) {exit;} if (!array_key_exists("phpUnit", $$json)) {exit;} unset($$json["phpUnit"]); file_put_contents($$infectionFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true)
133+
134+
php-migrations-fix-logs-relative-paths-for-infection: #### Fix logs paths in etc/qa/infection.json5 ##*I*##
135+
($(DOCKER_RUN) php -r '$$infectionFile = "etc/qa/infection.json5"; if (!file_exists($$infectionFile)) {exit;} $$json = json_decode(file_get_contents($$infectionFile), true); if (!is_array($$json)) {exit;} if (!array_key_exists("logs", $$json)) {exit;} foreach ($$json["logs"] as $$logsKey => $$logsPath) { if (is_string($$json["logs"][$$logsKey]) && str_starts_with($$json["logs"][$$logsKey], "./var/infection")) { $$json["logs"][$$logsKey] = str_replace("./var/infection", "../../var/infection", $$json["logs"][$$logsKey]); } } file_put_contents($$infectionFile, json_encode($$json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\r\n");' || true)
136+

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"require-dev": {
2222
"react/promise-timer": "^1.11.0",
23-
"wyrihaximus/makefiles": "^0.6.0"
23+
"wyrihaximus/makefiles": "^0.7.5"
2424
},
2525
"conflict": {
2626
"composer/compoer": "<2.6.0"

composer.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

etc/qa/infection.json5

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"timeout": 300,
3+
"source": {
4+
"directories": [
5+
"src"
6+
]
7+
},
8+
"logs": {
9+
"text": "../../var/infection.log",
10+
"summary": "../../var/infection-summary.log",
11+
"json": "../../var/infection.json",
12+
"perMutator": "../../var/infection-per-mutator.md"
13+
},
14+
"mutators": {
15+
"@default": true
16+
}
17+
}

infection.json.dist

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)