Skip to content

Commit 3c712d1

Browse files
committed
Update Makefile
1 parent 4e4c5c2 commit 3c712d1

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,18 +170,19 @@ infection:
170170
git clone https://github.com/phpstan/build-infection.git || true
171171
git -C build-infection fetch origin && git -C build-infection reset --hard origin/1.x
172172
composer install --working-dir build-infection --no-interaction --no-progress
173-
php build-infection/bin/infection-config.php --source-directory='build/PHPStan/Build'> infection.json5
173+
php build-infection/bin/infection-config.php --source-directory='build/PHPStan/Build'> tmp/infection.json5
174174
version=$(shell jq -r '.packages[] | select(.name == "infection/infection") | .version' build-infection/composer.lock); \
175-
wget https://github.com/infection/infection/releases/download/$$version/infection.phar --no-clobber;
176-
chmod +x infection.phar
175+
wget -P tmp/ https://github.com/infection/infection/releases/download/$$version/infection.phar --no-clobber;
176+
chmod +x tmp/infection.phar
177177
XDEBUG_MODE=coverage php tests/vendor/bin/paratest \
178178
--coverage-xml=tmp/coverage/coverage-xml \
179179
--log-junit=tmp/coverage/junit.xml
180+
baseBranch=$(shell git symbolic-ref refs/remotes/${remote:-origin}/HEAD | sed 's,.*/,,') \
180181
php infection.phar \
181-
--git-diff-base=origin/2.1.x \
182+
--configuration=tmp/infection.json5
183+
--git-diff-base=origin/$$baseBranch \
182184
--git-diff-lines \
183185
--coverage=tmp/coverage \
184186
--skip-initial-tests \
185187
--ignore-msi-with-no-mutations \
186188
--logger-text=php://stdout
187-
rm infection.json5 infection.phar

0 commit comments

Comments
 (0)