Merge branch '4.4'
* 4.4: [travis] fix testing flipped versions [travis] honor .gitattributes when building local packages
This commit is contained in:
commit
daf6d92953
8
.github/build-packages.php
vendored
8
.github/build-packages.php
vendored
@ -17,6 +17,7 @@ $mergeBase = trim(shell_exec(sprintf('git merge-base "%s" HEAD', array_shift($di
|
|||||||
|
|
||||||
$packages = array();
|
$packages = array();
|
||||||
$flags = JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE;
|
$flags = JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE;
|
||||||
|
$preferredInstall = json_decode(file_get_contents(__DIR__.'/composer-config.json'), true)['config']['preferred-install'];
|
||||||
|
|
||||||
foreach ($dirs as $k => $dir) {
|
foreach ($dirs as $k => $dir) {
|
||||||
if (!system("git diff --name-only $mergeBase -- $dir", $exitStatus)) {
|
if (!system("git diff --name-only $mergeBase -- $dir", $exitStatus)) {
|
||||||
@ -42,7 +43,12 @@ foreach ($dirs as $k => $dir) {
|
|||||||
$json = rtrim(json_encode(array('repositories' => $package->repositories), $flags), "\n}").','.substr($json, 1);
|
$json = rtrim(json_encode(array('repositories' => $package->repositories), $flags), "\n}").','.substr($json, 1);
|
||||||
file_put_contents($dir.'/composer.json', $json);
|
file_put_contents($dir.'/composer.json', $json);
|
||||||
}
|
}
|
||||||
passthru("cd $dir && tar -cf package.tar --exclude='package.tar' *");
|
|
||||||
|
if (isset($preferredInstall[$package->name]) && 'source' === $preferredInstall[$package->name]) {
|
||||||
|
passthru("cd $dir && tar -cf package.tar --exclude='package.tar' *");
|
||||||
|
} else {
|
||||||
|
passthru("cd $dir && git init && git add . && git commit -m - && git archive -o package.tar HEAD && rm .git/ -Rf");
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($package->extra->{'branch-alias'}->{'dev-master'})) {
|
if (!isset($package->extra->{'branch-alias'}->{'dev-master'})) {
|
||||||
echo "Missing \"dev-master\" branch-alias in composer.json extra.\n";
|
echo "Missing \"dev-master\" branch-alias in composer.json extra.\n";
|
||||||
|
@ -272,15 +272,16 @@ install:
|
|||||||
|
|
||||||
if [[ $COMPONENTS && $LEGACY && $TRAVIS_PULL_REQUEST != false ]]; then
|
if [[ $COMPONENTS && $LEGACY && $TRAVIS_PULL_REQUEST != false ]]; then
|
||||||
export FLIP='🙃'
|
export FLIP='🙃'
|
||||||
COMPONENTS=$(echo "$COMPONENTS" | xargs dirname | sort)
|
|
||||||
SYMFONY_VERSION=$(echo $SYMFONY_VERSION | awk '{print $1 - 1}')
|
SYMFONY_VERSION=$(echo $SYMFONY_VERSION | awk '{print $1 - 1}')
|
||||||
|
echo -e "\\n\\e[33;1mChecking out Symfony $SYMFONY_VERSION and running tests with patched components as deps\\e[0m"
|
||||||
export SYMFONY_REQUIRE=">=$SYMFONY_VERSION"
|
export SYMFONY_REQUIRE=">=$SYMFONY_VERSION"
|
||||||
export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev
|
export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev
|
||||||
echo -e "\\n\\e[33;1mChecking out Symfony $SYMFONY_VERSION and running tests with patched components as deps\\e[0m"
|
|
||||||
git fetch --depth=2 origin $SYMFONY_VERSION
|
git fetch --depth=2 origin $SYMFONY_VERSION
|
||||||
git checkout -m FETCH_HEAD
|
git checkout -m FETCH_HEAD
|
||||||
|
COMPONENTS=$(echo "$COMPONENTS" | xargs dirname | xargs -n1 -I{} bash -c "[ -e '{}/phpunit.xml.dist' ] && echo '{}'" | sort)
|
||||||
(cd src/Symfony/Component/HttpFoundation; composer config platform.ext-mongodb 1.6.0; composer require --dev --no-update mongodb/mongodb)
|
(cd src/Symfony/Component/HttpFoundation; composer config platform.ext-mongodb 1.6.0; composer require --dev --no-update mongodb/mongodb)
|
||||||
echo "$COMPONENTS" | parallel --gnu "tfold {} 'cd {} && $COMPOSER_UP && $PHPUNIT_X$LEGACY'" || X=1
|
[[ ! $COMPONENTS ]] || tfold 'phpunit install' SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1 ./phpunit install
|
||||||
|
[[ ! $COMPONENTS ]] || echo "$COMPONENTS" | parallel --gnu "tfold {} 'cd {} && $COMPOSER_UP && $PHPUNIT_X$LEGACY'" || X=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ ! $X ]] || (exit 1)
|
[[ ! $X ]] || (exit 1)
|
||||||
|
Reference in New Issue
Block a user