Merge branch '2.3' into 2.6
* 2.3: [travis] Do no tar in // [2.3] Static Code Analysis for Components
This commit is contained in:
commit
5a781cf631
@ -10,16 +10,15 @@ if [ -z "$components" ]; then
|
||||
exit 1
|
||||
fi
|
||||
echo '{"packages": {' > packages.json
|
||||
components=$(
|
||||
for c in $components; do
|
||||
sed -i ':a;N;$!ba;s#^{\n\(\s*\)\("name"\)#{\n\1"repositories": \[{ "type": "composer", "url": "file://'$(pwd)'/" }\],\n\1\2#' $c/composer.json
|
||||
n=$(php -r '$n=json_decode(file_get_contents("'$c'/composer.json"));echo $n->name;')
|
||||
echo '"'$n'": {"'$branch'.x-dev": ' >> packages.json
|
||||
cat $c/composer.json >> packages.json
|
||||
echo '"version": "'$branch.x-dev'",\n "dist": {"type": "tar", "url": "file://'$(pwd)/$c'/package'$branch'.tar"}\n}},' >> packages.json
|
||||
echo $c
|
||||
done;
|
||||
)
|
||||
sed -i ':a;N;$!ba;s/\n}\n"/,\n "/g' packages.json
|
||||
sed -i ':a;N;$!ba;s/}},$/\n}}\n}}/' packages.json
|
||||
echo "$components" | parallel --gnu "cd {}; tar -cf package$branch.tar --exclude='package*.tar' *"
|
||||
for c in $components; do
|
||||
(cd $c && tar -cf package$branch.tar --exclude='package*.tar' *)
|
||||
done
|
||||
|
@ -123,8 +123,9 @@ class Response
|
||||
*/
|
||||
public function getHeader($header, $first = true)
|
||||
{
|
||||
$normalizedHeader = str_replace('-', '_', strtolower($header));
|
||||
foreach ($this->headers as $key => $value) {
|
||||
if (str_replace('-', '_', strtolower($key)) == str_replace('-', '_', strtolower($header))) {
|
||||
if (str_replace('-', '_', strtolower($key)) === $normalizedHeader) {
|
||||
if ($first) {
|
||||
return is_array($value) ? (count($value) ? $value[0] : '') : $value;
|
||||
}
|
||||
|
Reference in New Issue
Block a user