lib/cocoapods-jxedt/command/binary/command/clean.rb in cocoapods-jxedt-0.0.14 vs lib/cocoapods-jxedt/command/binary/command/clean.rb in cocoapods-jxedt-0.0.15

- old
+ new

@@ -1,33 +1,33 @@ module Pod class Command class JxedtCommand < Command class Binary < JxedtCommand class Clean < Binary - self.summary = 'clean cache repo.' + self.summary = '清除编译的组件二进制' self.description = <<-DESC - clean cache repo. + 清除编译的组件二进制\n DESC self.command = 'clean' self.arguments = [ ] def self.options [ - ['--name', 'Remove the file with the corresponding name.'], - ['--local', 'Remove local cache.'], - ['--all', 'Remove all files.'], + ['--name', '删除一个或多个二进制产物,多个以,分隔'], + ['--local', '只删除本地的二进制产物'], + ['--all', '删除所有的二进制产物,执行过程需要再次确认'], ] end def initialize(argv) @names = argv.option('name', '').split(',') @local = argv.flag?('local', false) @all = argv.flag?('all', false) super end def validate! - help! "Please enter the necessary options." if @names.empty? && !@all + help! "至少要添加一个选项,'--name'或'--all'" if @names.empty? && !@all super end def run podfile = Pod::Config.instance.podfile @@ -69,10 +69,10 @@ UI.puts "⚠️ ⚠️ ⚠️ 本地缓存文件已清除: #{local_deleted}" if local_deleted.size > 0 UI.puts "⚠️ ⚠️ ⚠️ 远程缓存文件已清除: #{remote_deleted}" if remote_deleted.size > 0 else random = (0...10).map { (97 + rand(26)).chr }.join input = get_stdin("你确认要清除所有缓存吗?包括远程仓库的缓存。确认请输入: #{random}") - help! "输入错误,自动退出。" if random != input + help! "输入错误,自动退出" if random != input local_cache_dir.rmtree if local_cache_dir.exist? if commander remote_cache_dir = Pathname.new(cache_path) + "GeneratedFrameworks" \ No newline at end of file