8000 Merge branch '2.8' into 3.4 · sroze/symfony@e170d94 · GitHub
[go: up one dir, main page]

Skip to content

Commit e170d94

Browse files
Merge branch '2.8' into 3.4
* 2.8: [travis][appveyor] fix ter
2 parents fc484d7 + 74b6689 commit e170d94

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

.github/build-packages.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
$packages[$package->name][$package->version] = $package;
5151

52-
$versions = file_get_contents('https://packagist.org/p/'.$package->name.'.json');
52+
$versions = @file_get_contents('https://repo.packagist.org/p/'.$package->name.'.json') ?: sprintf('{"packages":{"%s":{"dev-master":%s}}}', $package->name, file_get_contents($dir.'/composer.json'));
5353
$versions = json_decode($versions)->packages->{$package->name};
5454

5555
if ($package->version === str_replace('-dev', '.x-dev', $versions->{'dev-master'}->extra->{'branch-alias'}->{'dev-master'})) {
@@ -74,8 +74,7 @@
7474
'type' => 'composer',
7575
'url' => 'file://'.str_replace(DIRECTORY_SEPARATOR, '/', dirname(__DIR__)).'/',
7676
));
77-
if (false === strpos($json, "\n \"repositories\": [\n")) {
78-
$json = rtrim(json_encode(array('repositories' => $package->repositories), $flags), "\n}").','.substr($json, 1);
79-
file_put_contents('composer.json', $json);
80-
}
77+
$json = preg_replace('/\n "repositories": \[\n.*?\n \],/s', '', $json);
78+
$json = rtrim(json_encode(array('repositories' => $package->repositories), $flags), "\n}").','.substr($json, 1);
79+
file_put_contents('composer.json', $json);
8180
}

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dist: trusty
44
sudo: false
55

66
git:
7-
depth: 1
7+
depth: 2
88

99
addons:
1010
apt_packages:

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
build: false
2-
clone_depth: 1
2+
clone_depth: 2
33
clone_folder: c:\projects\symfony
44

55
cache:

0 commit comments

Comments
 (0)
0