mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 01:16:19 +00:00
clean-npm-cache: Rename success_stamp to current_success_stamp.
This commit is contained in:
@@ -21,11 +21,11 @@ if "--travis" in sys.argv:
|
|||||||
sha1sum = generate_sha1sum_node_modules()
|
sha1sum = generate_sha1sum_node_modules()
|
||||||
npm_cache = os.path.join(NODE_MODULES_CACHE_PATH, sha1sum)
|
npm_cache = os.path.join(NODE_MODULES_CACHE_PATH, sha1sum)
|
||||||
cached_node_modules = os.path.join(npm_cache, 'node_modules')
|
cached_node_modules = os.path.join(npm_cache, 'node_modules')
|
||||||
success_stamp = os.path.join(cached_node_modules, '.success-stamp')
|
current_success_stamp = os.path.join(cached_node_modules, '.success-stamp')
|
||||||
|
|
||||||
for cache_dir_base in os.listdir(NODE_MODULES_CACHE_PATH):
|
for cache_dir_base in os.listdir(NODE_MODULES_CACHE_PATH):
|
||||||
node_modules_dir = os.path.join(NODE_MODULES_CACHE_PATH, cache_dir_base)
|
node_modules_dir = os.path.join(NODE_MODULES_CACHE_PATH, cache_dir_base)
|
||||||
if node_modules_dir == npm_cache and os.path.exists(success_stamp):
|
if node_modules_dir == npm_cache and os.path.exists(current_success_stamp):
|
||||||
print("Keeping used node_modules cache dir %s" % (node_modules_dir,))
|
print("Keeping used node_modules cache dir %s" % (node_modules_dir,))
|
||||||
else:
|
else:
|
||||||
print("Cleaning unused node_modules cache dir %s" % (node_modules_dir,))
|
print("Cleaning unused node_modules cache dir %s" % (node_modules_dir,))
|
||||||
|
|||||||
Reference in New Issue
Block a user