From 703b87c1163604c2146e26912fb13839a10bd65a Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Mon, 25 Sep 2017 16:10:11 -0700 Subject: [PATCH] caches: Move clean-unused-caches to scripts/lib/. --- .travis.yml | 2 +- scripts/{ => lib}/clean-unused-caches | 2 +- scripts/purge-old-deployments | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename scripts/{ => lib}/clean-unused-caches (87%) diff --git a/.travis.yml b/.travis.yml index 7e8ddb28e8..9f39b66f34 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ install: # Clean any caches that are not in use to avoid our cache # becoming huge. - - mispipe "scripts/clean-unused-caches --verbose --threshold 0" ts + - mispipe "scripts/lib/clean-unused-caches --verbose --threshold 0" ts script: # We unset GEM_PATH here as a hack to work around Travis CI having diff --git a/scripts/clean-unused-caches b/scripts/lib/clean-unused-caches similarity index 87% rename from scripts/clean-unused-caches rename to scripts/lib/clean-unused-caches index 85443355c7..c4bd17027f 100755 --- a/scripts/clean-unused-caches +++ b/scripts/lib/clean-unused-caches @@ -4,7 +4,7 @@ import os import subprocess import sys -ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(ZULIP_PATH) from scripts.lib.zulip_tools import get_environment, parse_cache_script_args diff --git a/scripts/purge-old-deployments b/scripts/purge-old-deployments index 247f3b42fd..14b3e15c50 100755 --- a/scripts/purge-old-deployments +++ b/scripts/purge-old-deployments @@ -67,7 +67,7 @@ def main(): print("Cleaning orphaned/unused caches...") # Call 'clean-unused-caches' script to clean any orphaned/unused caches. - subprocess.check_call([os.path.join(ZULIP_PATH, "scripts/clean-unused-caches")] + sys.argv[1:]) + subprocess.check_call([os.path.join(ZULIP_PATH, "scripts/lib/clean-unused-caches")] + sys.argv[1:]) print("Done!\n") if __name__ == "__main__":