2017-08-22 00:18:59 +02:00
|
|
|
#!/usr/bin/env python3
|
2021-06-11 21:24:36 +02:00
|
|
|
import argparse
|
2017-08-22 00:18:59 +02:00
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
2017-09-26 01:10:11 +02:00
|
|
|
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
2017-08-22 00:18:59 +02:00
|
|
|
sys.path.append(ZULIP_PATH)
|
2021-04-25 10:37:14 +02:00
|
|
|
from scripts.lib import clean_emoji_cache, clean_node_cache, clean_venv_cache, clean_yarn_cache
|
2019-02-02 23:53:23 +01:00
|
|
|
from scripts.lib.zulip_tools import parse_cache_script_args
|
2020-06-11 00:54:34 +02:00
|
|
|
|
2017-08-22 00:18:59 +02:00
|
|
|
|
2021-06-11 21:24:36 +02:00
|
|
|
def main(args: argparse.Namespace) -> None:
|
2017-08-22 00:18:59 +02:00
|
|
|
os.chdir(ZULIP_PATH)
|
2018-06-18 16:28:34 +02:00
|
|
|
clean_venv_cache.main(args)
|
|
|
|
clean_node_cache.main(args)
|
2021-04-25 10:37:14 +02:00
|
|
|
clean_yarn_cache.main(args)
|
2018-06-18 16:28:34 +02:00
|
|
|
clean_emoji_cache.main(args)
|
2017-08-22 00:18:59 +02:00
|
|
|
|
2021-02-12 08:19:30 +01:00
|
|
|
|
2017-08-22 00:18:59 +02:00
|
|
|
if __name__ == "__main__":
|
2021-06-11 21:24:36 +02:00
|
|
|
args = parse_cache_script_args("This script cleans unused Zulip caches.")
|
|
|
|
main(args)
|