Skip to content

Commit 76223b2

Browse files
committed
minor #18775 Fix computation of PR diffs for component matrix lines (nicolas-grekas)
This PR was merged into the 2.3 branch. Discussion ---------- Fix computation of PR diffs for component matrix lines | Q | A | ------------- | --- | Branch? | 2.3 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Validated on https://travis-ci.org/symfony/symfony/jobs/130061271 who fails otherwise. Commits ------- e7a3ae7 Fix computation of PR diffs for component matrix lines
2 parents c02eee0 + e7a3ae7 commit 76223b2

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

.travis.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
<?php
22

33
if (4 > $_SERVER['argc']) {
4-
echo "Usage: commit-range branch dir1 dir2 ... dirN\n";
4+
echo "Usage: branch dir1 dir2 ... dirN\n";
55
exit(1);
66
}
77

88
$dirs = $_SERVER['argv'];
99
array_shift($dirs);
10-
$range = array_shift($dirs);
1110
$branch = array_shift($dirs);
1211

1312
$packages = array();
1413
$flags = PHP_VERSION_ID >= 50400 ? JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE : 0;
1514

1615
foreach ($dirs as $dir) {
17-
if (!`git diff --name-only $range -- $dir`) {
16+
if (!`git diff --name-only $branch...HEAD -- $dir`) {
1817
continue;
1918
}
2019
echo "$dir\n";

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ before_install:
5858
install:
5959
- if [[ ! $skip ]]; then COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); fi
6060
# Create local composer packages for each patched components and reference them in composer.json files when cross-testing components
61-
- if [[ ! $skip && $deps ]]; then php .travis.php $TRAVIS_COMMIT_RANGE $TRAVIS_BRANCH $COMPONENTS; fi
61+
- if [[ ! $skip && $deps ]]; then php .travis.php $TRAVIS_BRANCH $COMPONENTS; fi
6262
# For the master branch when deps=high, the version before master is checked out and tested with the locally patched components
6363
- if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then SYMFONY_VERSION=$(git ls-remote --heads | grep -o '/[1-9].*' | tail -n 1 | sed s/.//); else SYMFONY_VERSION=$(cat composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9.]*'); fi
6464
- if [[ $deps = high && $TRAVIS_BRANCH = master ]]; then git fetch origin $SYMFONY_VERSION; git checkout -m FETCH_HEAD; COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); ./phpunit install; fi

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy