aboutsummaryrefslogtreecommitdiff
path: root/test-infra
diff options
context:
space:
mode:
authorChris Rebert <[email protected]>2013-12-16 00:02:42 -0800
committerChris Rebert <[email protected]>2013-12-16 00:02:42 -0800
commit2ae39d716651be9c7bddfa6deeb7300a038afbaa (patch)
treee07965db392c00dfa86c4b7dea2d7f383f8ea1ac /test-infra
parentec261a83a565cfa13d436feebd7a67360a920e9a (diff)
parent498f00a2447a3c873c239313beeb5dc263bf5c74 (diff)
downloadbootstrap-2ae39d716651be9c7bddfa6deeb7300a038afbaa.tar.xz
bootstrap-2ae39d716651be9c7bddfa6deeb7300a038afbaa.zip
Merge pull request #11891 from twbs/cache-jekyll-bundle
use S3-cached Jekyll install to further speed up the Travis build
Diffstat (limited to 'test-infra')
-rwxr-xr-xtest-infra/s3_cache.py (renamed from test-infra/node_modules_cache.py)16
1 files changed, 8 insertions, 8 deletions
diff --git a/test-infra/node_modules_cache.py b/test-infra/s3_cache.py
index 6acddb38a..6f099a19f 100755
--- a/test-infra/node_modules_cache.py
+++ b/test-infra/s3_cache.py
@@ -58,22 +58,22 @@ def _extract_tarball(directory):
def download(directory):
_delete_file_quietly(NEED_TO_UPLOAD_MARKER)
try:
- print("Downloading {} tarball from S3...".format(basename(directory)))
+ print("Downloading {} tarball from S3...".format(friendly_name))
key.get_contents_to_filename(_tarball_filename_for(directory))
except S3ResponseError as err:
open(NEED_TO_UPLOAD_MARKER, 'a').close()
print(err)
- raise SystemExit("Cached {} download failed!".format(basename(directory)))
+ raise SystemExit("Cached {} download failed!".format(friendly_name))
print("Downloaded {}.".format(_tarball_size(directory)))
_extract_tarball(directory)
- print("{} successfully installed from cache.".format(directory))
+ print("{} successfully installed from cache.".format(friendly_name))
def upload(directory):
_create_tarball(directory)
- print("Uploading {} tarball to S3... ({})".format(basename(directory), _tarball_size(directory)))
+ print("Uploading {} tarball to S3... ({})".format(friendly_name, _tarball_size(directory)))
key.set_contents_from_filename(_tarball_filename_for(directory))
- print("{} cache successfully updated.".format(directory))
+ print("{} cache successfully updated.".format(friendly_name))
_delete_file_quietly(NEED_TO_UPLOAD_MARKER)
@@ -82,9 +82,9 @@ if __name__ == '__main__':
# AWS_ACCESS_KEY_ID - AWS Access Key ID
# AWS_SECRET_ACCESS_KEY - AWS Secret Access Key
argv.pop(0)
- if len(argv) != 3:
- raise SystemExit("USAGE: node_modules_cache.py <download | upload> <dependencies file> <directory>")
- mode, dependencies_file, directory = argv
+ if len(argv) != 4:
+ raise SystemExit("USAGE: node_modules_cache.py <download | upload> <friendly name> <dependencies file> <directory>")
+ mode, friendly_name, dependencies_file, directory = argv
conn = S3Connection()
bucket = conn.lookup(BUCKET_NAME)