From 62a5781b92ef94866842716e06d0cee0cb4b91b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Wed, 12 Feb 2014 00:48:57 +0100 Subject: [PATCH] Only try to cache dependencies when Amazon secret is available Fixes the case when someone forks the repo and runs Travis on their own. Also, allows the use-case of restoring dependencies only without necessarily trying to cache them. --- script/cached-bundle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/cached-bundle b/script/cached-bundle index 457d0db9..446f4878 100755 --- a/script/cached-bundle +++ b/script/cached-bundle @@ -39,7 +39,7 @@ fi bundle "$@" -if [ ! -f "$cache_name" ]; then +if [ ! -f "$cache_name" ] && [ -n "$AMAZON_SECRET_ACCESS_KEY" ]; then echo "Caching \`${bundle_path}' to S3" tar czf "$cache_name" "$bundle_path" script/s3-put "$cache_name" "${AMAZON_S3_BUCKET}:${TRAVIS_REPO_SLUG}/${cache_name}"