Skip to content

Commit 6998019

Browse files
authored
Merge pull request #300 from WyriHaximus/renovate/wyrihaximus-makefiles-0.x
Update dependency wyrihaximus/makefiles to ^0.5.0
2 parents 21bc207 + dc3da84 commit 6998019

File tree

3 files changed

+24
-21
lines changed

3 files changed

+24
-21
lines changed

Makefile

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

44
.PHONY: *
55

6+
CONTAINER_REGISTRY_REPO="ghcr.io/wyrihaximusnet/php"
67
COMPOSER_SHOW_EXTENSION_LIST_PROD=$(shell 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/.$$//')
78
COMPOSER_SHOW_EXTENSION_LIST_DEV=$(shell composer show -s | grep -o "\(ext-\).\+" | sort | uniq | cut -d- -f2- | cut -d" " -f1 | xargs | sed -e 's/ /, /g' | tr -cd '[:alnum:],')
89
COMPOSER_SHOW_EXTENSION_LIST=$(shell echo "${COMPOSER_SHOW_EXTENSION_LIST_PROD},${COMPOSER_SHOW_EXTENSION_LIST_DEV}")
910
SLIM_DOCKER_IMAGE=$(shell php -r 'echo count(array_intersect(["gd", "vips"], explode(",", "${COMPOSER_SHOW_EXTENSION_LIST}"))) > 0 ? "" : "-slim";')
1011
NTS_OR_ZTS_DOCKER_IMAGE=$(shell php -r 'echo count(array_intersect(["parallel"], explode(",", "${COMPOSER_SHOW_EXTENSION_LIST}"))) > 0 ? "zts" : "nts";')
11-
PHP_VERSION:=$(shell docker run --rm -v "`pwd`:`pwd`" jess/jq jq -r -c '.config.platform.php' "`pwd`/composer.json" | php -r "echo str_replace('|', '.', explode('.', implode('|', explode('.', stream_get_contents(STDIN), 2)), 2)[0]);")
12-
CONTAINER_NAME=$(shell echo "ghcr.io/wyrihaximusnet/php:${PHP_VERSION}-${NTS_OR_ZTS_DOCKER_IMAGE}-alpine${SLIM_DOCKER_IMAGE}-dev")
12+
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]);")
13+
CONTAINER_NAME=$(shell echo "${CONTAINER_REGISTRY_REPO}:${PHP_VERSION}-${NTS_OR_ZTS_DOCKER_IMAGE}-alpine${SLIM_DOCKER_IMAGE}-dev")
1314
COMPOSER_CACHE_DIR=$(shell composer config --global cache-dir -q || echo ${HOME}/.composer-php/cache)
14-
COMPOSER_CONTAINER_CACHE_DIR=$(shell docker run --rm -it ${CONTAINER_NAME} composer config --global cache-dir -q || echo ${HOME}/.composer-php/cache)
15+
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)
1516

1617
ifneq ("$(wildcard /.you-are-in-a-wyrihaximus.net-php-docker-image)","")
1718
IN_DOCKER=TRUE
@@ -37,15 +38,22 @@ else
3738
endif
3839

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

42-
syntax-php: ## Lint PHP syntax ##*LH*##
43+
on-install-or-update: ## Runs everything ####
44+
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | grep -E "##\*(I|ILH)\*##" | awk 'BEGIN {FS = ":.*?## "}; {printf "%s\n", $$1}' | xargs -o $(MAKE)
45+
46+
syntax-php: ## Lint PHP syntax ##*ILH*##
4347
$(DOCKER_RUN) vendor/bin/parallel-lint --exclude vendor .
4448

45-
rector-upgrade: ## Upgrade any automatically upgradable old code ###
49+
composer-normalize: ### Normalize composer.json ##*I*##
50+
$(DOCKER_RUN) composer normalize
51+
$(DOCKER_RUN) composer update --lock --no-scripts
52+
53+
rector-upgrade: ## Upgrade any automatically upgradable old code ##*I*##
4654
$(DOCKER_RUN) vendor/bin/rector -c ./etc/qa/rector.php
4755

48-
cs-fix: ## Fix any automatically fixable code style issues ###
56+
cs-fix: ## Fix any automatically fixable code style issues ##*I*##
4957
$(DOCKER_RUN) vendor/bin/phpcbf --parallel=1 --cache=./var/.phpcs.cache.json --standard=./etc/qa/phpcs.xml || $(DOCKER_RUN) vendor/bin/phpcbf --parallel=1 --cache=./var/.phpcs.cache.json --standard=./etc/qa/phpcs.xml || $(DOCKER_RUN) vendor/bin/phpcbf --parallel=1 --cache=./var/.phpcs.cache.json --standard=./etc/qa/phpcs.xml -vvvv
5058

5159
cs: ## Check the code for code style issues ##*LCH*##
@@ -56,11 +64,9 @@ stan: ## Run static analysis (PHPStan) ##*LCH*##
5664

5765
unit-testing: ## Run tests ##*A*##
5866
$(DOCKER_RUN) vendor/bin/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
59-
$(DOCKER_RUN) test -n "$(COVERALLS_REPO_TOKEN)" && test -n "$(COVERALLS_RUN_LOCALLY)" && test -f ./var/tests-unit-clover-coverage.xml && vendor/bin/php-coveralls -v --coverage_clover ./build/logs/clover.xml --json_path ./var/tests-unit-clover-coverage-upload.json || true
6067

6168
unit-testing-raw: ## Run tests ##*D*## ####
6269
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
63-
test -n "$(COVERALLS_REPO_TOKEN)" && test -n "$(COVERALLS_RUN_LOCALLY)" && test -f ./var/tests-unit-clover-coverage.xml && ./vendor/bin/php-coveralls -v --coverage_clover ./build/logs/clover.xml --json_path ./var/tests-unit-clover-coverage-upload.json || true
6470

6571
mutation-testing: ## Run mutation testing ##*LCH*##
6672
$(DOCKER_RUN) vendor/bin/infection --ansi --log-verbosity=all --ignore-msi-with-no-mutations --threads=$(THREADS) || (cat ./var/infection.log && false)
@@ -74,9 +80,6 @@ composer-require-checker: ## Ensure we require every package used in this packag
7480
composer-unused: ## Ensure we don't require any package we don't use in this package directly ##*C*##
7581
$(DOCKER_RUN) vendor/bin/composer-unused --ansi --configuration=./etc/qa/composer-unused.php
7682

77-
libyear: ### Calculate how many libyear this package is behind with dependencies
78-
$(DOCKER_RUN) vendor/bin/libyear
79-
8083
backward-compatibility-check: ## Check code for backwards incompatible changes ##*C*##
8184
$(MAKE) backward-compatibility-check-raw || true
8285

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.4.3"
23+
"wyrihaximus/makefiles": "^0.5.0"
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.

0 commit comments

Comments
 (0)