Skip to content

Commit dc6ea1a

Browse files
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 //
2 parents 8a18b56 + 4f93aa3 commit dc6ea1a

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

.travis.sh

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,15 @@ if [ -z "$components" ]; then
1010
exit 1
1111
fi
1212
echo '{"packages": {' > packages.json
13-
components=$(
14-
for c in $components; do
15-
sed -i ':a;N;$!ba;s#^{\n\(\s*\)\("name"\)#{\n\1"repositories": \[{ "type": "composer", "url": "file://'$(pwd)'/" }\],\n\1\2#' $c/composer.json
16-
n=$(php -r '$n=json_decode(file_get_contents("'$c'/composer.json"));echo $n->name;')
17-
echo '"'$n'": {"'$branch'.x-dev": ' >> packages.json
18-
cat $c/composer.json >> packages.json
19-
echo '"version": "'$branch.x-dev'",\n "dist": {"type": "tar", "url": "file://'$(pwd)/$c'/package'$branch'.tar"}\n}},' >> packages.json
20-
echo $c
21-
done;
22-
)
13+
for c in $components; do
14+
sed -i ':a;N;$!ba;s#^{\n\(\s*\)\("name"\)#{\n\1"repositories": \[{ "type": "composer", "url": "file://'$(pwd)'/" }\],\n\1\2#' $c/composer.json
15+
n=$(php -r '$n=json_decode(file_get_contents("'$c'/composer.json"));echo $n->name;')
16+
echo '"'$n'": {"'$branch'.x-dev": ' >> packages.json
17+
cat $c/composer.json >> packages.json
18+
echo '"version": "'$branch.x-dev'",\n "dist": {"type": "tar", "url": "file://'$(pwd)/$c'/package'$branch'.tar"}\n}},' >> packages.json
19+
done;
2320
sed -i ':a;N;$!ba;s/\n}\n"/,\n "/g' packages.json
2421
sed -i ':a;N;$!ba;s/}},$/\n}}\n}}/' packages.json
25-
echo "$components" | parallel --gnu "cd {}; tar -cf package$branch.tar --exclude='package*.tar' *"
22+
for c in $components; do
23+
(cd $c && tar -cf package$branch.tar --exclude='package*.tar' *)
24+
done

0 commit comments

Comments
 (0)