mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-31 20:13:46 +00:00 
			
		
		
		
	This commit removes redundant yarn cache by removing the old version directories, i.e. All the directory under `~/.cache/yarn` except `~/.cache/yarn/v6` (current version directory). Fixes #15964.
		
			
				
	
	
		
			22 lines
		
	
	
		
			613 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			613 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/env python3
 | |
| import os
 | |
| import sys
 | |
| 
 | |
| ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 | |
| sys.path.append(ZULIP_PATH)
 | |
| from scripts.lib import clean_emoji_cache, clean_node_cache, clean_venv_cache, clean_yarn_cache
 | |
| from scripts.lib.zulip_tools import parse_cache_script_args
 | |
| 
 | |
| 
 | |
| def main() -> None:
 | |
|     args = parse_cache_script_args("This script cleans unused Zulip caches.")
 | |
|     os.chdir(ZULIP_PATH)
 | |
|     clean_venv_cache.main(args)
 | |
|     clean_node_cache.main(args)
 | |
|     clean_yarn_cache.main(args)
 | |
|     clean_emoji_cache.main(args)
 | |
| 
 | |
| 
 | |
| if __name__ == "__main__":
 | |
|     main()
 |