diff --git a/.travis.php b/.travis.php index c27942913a..1334f14ad4 100644 --- a/.travis.php +++ b/.travis.php @@ -19,13 +19,15 @@ foreach ($dirs as $dir) { } echo "$dir\n"; - $package = json_decode(file_get_contents($dir.'/composer.json')); + $json = file_get_contents($dir.'/composer.json'); + $package = json_decode($json); $package->repositories = array(array( 'type' => 'composer', 'url' => 'file://'.__DIR__.'/', )); - file_put_contents($dir.'/composer.json', json_encode($package, $flags)); + $json = rtrim(json_encode(array('repositories' => $package->repositories), $flags), "\n}").','.substr($json, 1); + file_put_contents($dir.'/composer.json', $json); passthru("cd $dir && tar -cf package.tar --exclude='package.tar' *"); $package->version = $branch.'.x-dev';