Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2018-01-29 20:17:11 +0300
committerJunio C Hamano <gitster@pobox.com>2018-01-31 00:27:19 +0300
commitb2cbaa091ca676478d131afd40ca4717cc5eed39 (patch)
tree0c39192c3bd054dd7ab30daf6233d4d21887a971 /ci/run-linux32-build.sh
parent04d47e969a1fb952baffbd12a1a0dd2dc6cd2746 (diff)
travis-ci: don't repeat the path of the cache directory
Some of our 'ci/*' scripts repeat the name or full path of the Travis CI cache directory, and the following patches will add new places using that path. Use a variable to refer to the path of the cache directory instead, so it's hard-coded only in a single place. Pay extra attention to the 32 bit Linux build: it runs in a Docker container, so pass the path of the cache directory from the host to the container in an environment variable. Note that an environment variable passed this way is exported inside the container, therefore its value is directly available in the 'su' snippet even though that snippet is single quoted. Furthermore, use the variable in the container only if it's been assigned a non-empty value, to prevent errors when someone is running or debugging the Docker build locally, because in that case the variable won't be set as there won't be any Travis CI cache. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ci/run-linux32-build.sh')
-rwxr-xr-xci/run-linux32-build.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/ci/run-linux32-build.sh b/ci/run-linux32-build.sh
index 248183982b..d020b762ca 100755
--- a/ci/run-linux32-build.sh
+++ b/ci/run-linux32-build.sh
@@ -28,7 +28,7 @@ test -z $HOST_UID || (CI_USER="ci" && useradd -u $HOST_UID $CI_USER)
linux32 --32bit i386 su -m -l $CI_USER -c '
set -ex
cd /usr/src/git
- ln -s /tmp/travis-cache/.prove t/.prove
+ test -n "$cache_dir" && ln -s "$cache_dir/.prove" t/.prove
make --jobs=2
make --quiet test
'