minor #13918 [travis] Do no tar in // (nicolas-grekas)

This PR was merged into the 2.3 branch.

Discussion
----------

[travis] Do no tar in //

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Using tar in parallel break 2.6 tests randomly with messages like "tar: Acl: file changed as we read it"
Removing parallel has no perf impact in this case and fixes the issue.
Best review with `?w=1`

Commits
-------

4f93aa3 [travis] Do no tar in //
This commit is contained in:
Nicolas Grekas 2015-03-13 14:21:24 +01:00
commit dc6ea1a859
1 changed files with 10 additions and 11 deletions

View File

@ -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;
)
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
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