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:
commit
dc6ea1a859
@ -10,16 +10,15 @@ if [ -z "$components" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo '{"packages": {' > packages.json
|
echo '{"packages": {' > packages.json
|
||||||
components=$(
|
|
||||||
for c in $components; do
|
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
|
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;')
|
n=$(php -r '$n=json_decode(file_get_contents("'$c'/composer.json"));echo $n->name;')
|
||||||
echo '"'$n'": {"'$branch'.x-dev": ' >> packages.json
|
echo '"'$n'": {"'$branch'.x-dev": ' >> packages.json
|
||||||
cat $c/composer.json >> 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 '"version": "'$branch.x-dev'",\n "dist": {"type": "tar", "url": "file://'$(pwd)/$c'/package'$branch'.tar"}\n}},' >> packages.json
|
||||||
echo $c
|
|
||||||
done;
|
done;
|
||||||
)
|
|
||||||
sed -i ':a;N;$!ba;s/\n}\n"/,\n "/g' packages.json
|
sed -i ':a;N;$!ba;s/\n}\n"/,\n "/g' packages.json
|
||||||
sed -i ':a;N;$!ba;s/}},$/\n}}\n}}/' 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
|
||||||
|
Reference in New Issue
Block a user