Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 68b8dab

Browse filesBrowse files
minor #19929 [ci] Fix build-packages.php (nicolas-grekas)
This PR was merged into the 2.7 branch. Discussion ---------- [ci] Fix build-packages.php | Q | A | ------------- | --- | Branch? | 2.7 | Tests pass? | yes | License | MIT Already validated in #19927 Commits ------- 221e21c [ci] Fix build-packages.php
2 parents 2a9be06 + 221e21c commit 68b8dab
Copy full SHA for 68b8dab

File tree

Expand file treeCollapse file tree

3 files changed

+10
-7
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+10
-7
lines changed

‎.github/build-packages.php

Copy file name to clipboardExpand all lines: .github/build-packages.php
+7-4Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
<?php
22

3-
if (4 > $_SERVER['argc']) {
4-
echo "Usage: branch version dir1 dir2 ... dirN\n";
3+
if (3 > $_SERVER['argc']) {
4+
echo "Usage: branch dir1 dir2 ... dirN\n";
55
exit(1);
66
}
77
chdir(dirname(__DIR__));
88

99
$dirs = $_SERVER['argv'];
1010
array_shift($dirs);
1111
$mergeBase = trim(shell_exec(sprintf('git merge-base %s HEAD', array_shift($dirs))));
12-
$version = array_shift($dirs);
1312

1413
$packages = array();
1514
$flags = PHP_VERSION_ID >= 50400 ? JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE : 0;
@@ -40,7 +39,11 @@
4039
}
4140
passthru("cd $dir && tar -cf package.tar --exclude='package.tar' *");
4241

43-
$package->version = $version.'.999';
42+
if (!isset($package->extra->{'branch-alias'}->{'dev-master'})) {
43+
echo "Missing \"dev-master\" branch-alias in composer.json extra.\n";
44+
exit(1);
45+
}
46+
$package->version = str_replace('-dev', '.999', $package->extra->{'branch-alias'}->{'dev-master'});
4447
$package->dist['type'] = 'tar';
4548
$package->dist['url'] = 'file://'.str_replace(DIRECTORY_SEPARATOR, '/', dirname(__DIR__))."/$dir/package.tar";
4649

‎.travis.yml

Copy file name to clipboardExpand all lines: .travis.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ install:
6565
- if [[ ! $skip && $deps ]]; then echo -e '{\n"require":{'"$(grep phpunit-bridge composer.json)"'"php":"*"},"minimum-stability":"dev"}' > composer.json; fi
6666
- if [[ ! $skip ]]; then COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n'); fi
6767
# Create local composer packages for each patched components and reference them in composer.json files when cross-testing components
68-
- if [[ ! $skip && $deps ]]; then php .github/build-packages.php HEAD^ $TRAVIS_BRANCH $COMPONENTS; fi
68+
- if [[ ! $skip && $deps ]]; then php .github/build-packages.php HEAD^ $COMPONENTS; fi
6969
- if [[ ! $skip && $deps ]]; then mv composer.json composer.json.phpunit; mv composer.json.orig composer.json; fi
70-
- if [[ ! $skip && ! $deps ]]; then php .github/build-packages.php HEAD^ $TRAVIS_BRANCH src/Symfony/Bridge/PhpUnit; fi
70+
- if [[ ! $skip && ! $deps ]]; then php .github/build-packages.php HEAD^ src/Symfony/Bridge/PhpUnit; fi
7171
# For the master branch when deps=high, the version before master is checked out and tested with the locally patched components
7272
- 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
7373
- 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'); fi

‎appveyor.yml

Copy file name to clipboardExpand all lines: appveyor.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ install:
5151
- IF NOT EXIST composer.phar (appveyor DownloadFile https://getcomposer.org/download/1.2.1/composer.phar)
5252
- php composer.phar self-update
5353
- copy /Y .composer\* %APPDATA%\Composer\
54-
- php .github/build-packages.php "HEAD^" %APPVEYOR_REPO_BRANCH% src\Symfony\Bridge\PhpUnit
54+
- php .github/build-packages.php "HEAD^" src\Symfony\Bridge\PhpUnit
5555
- IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev)
5656
- php composer.phar update --no-progress --ansi
5757
- SET COMPOSER_ROOT_VERSION=

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.