Skip to content

Commit 9ed6e60

Browse files
committed
Use isCI in run.sh
1 parent 2805aed commit 9ed6e60

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ci/docker/run.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ source "$ci_dir/shared.sh"
4646
CACHE_DOMAIN="${CACHE_DOMAIN:-ci-caches.rust-lang.org}"
4747

4848
if [ -f "$docker_dir/$image/Dockerfile" ]; then
49-
if [ "$CI" != "" ]; then
49+
if isCI; then
5050
hash_key=/tmp/.docker-hash-key.txt
5151
rm -f "${hash_key}"
5252
echo $image >> $hash_key
@@ -102,7 +102,7 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
102102
CACHE_IMAGE_TAG=${REGISTRY}/${REGISTRY_USERNAME}/rust-ci-cache:${cksum}
103103

104104
# On non-CI jobs, we don't do any caching.
105-
if [[ "$CI" == "" ]];
105+
if ! isCI;
106106
then
107107
retry docker build --rm -t rust-ci -f "$dockerfile" "$context"
108108
# On PR CI jobs, we don't have permissions to write to the registry cache,
@@ -289,7 +289,7 @@ else
289289
command=(/checkout/src/ci/run.sh)
290290
fi
291291

292-
if [ "$CI" != "" ]; then
292+
if isCI; then
293293
# Get some needed information for $BASE_COMMIT
294294
#
295295
# This command gets the last merge commit which we'll use as base to list

0 commit comments

Comments
 (0)