lib/cocoapods-jxedt/command/binary/command/push.rb in cocoapods-jxedt-0.0.20 vs lib/cocoapods-jxedt/command/binary/command/push.rb in cocoapods-jxedt-0.0.21

- old
+ new

@@ -10,15 +10,17 @@ self.command = 'push' self.arguments = [ ] def self.options [ - ['--force-push', '强制推送组件二进制到远程,远程有相同的校验和会被本地覆盖'] + ['--force-push', '强制推送组件二进制到远程,远程有相同的校验和会被本地覆盖'], + ['--name', '需要推送到远程的组件名称,不填则推送全部的二进制组件到远程'] ] end def initialize(argv) @force_push = argv.flag?('force-push', false) + @name = argv.option('name') super end def validate! super @@ -30,10 +32,13 @@ help! '你需要在cache_repo中配置正确的git仓库地址!' unless Jxedt.config.cache_repo_enabled? require 'cocoapods-jxedt/git_helper/cache_pucher' output_dir = Pod::Config.instance.sandbox.root + Jxedt.config.binary_dir - Jxedt::CachePucher.push(output_dir, nil, @force_push) + + targets = [] + targets += @name.split(',') if @name && @name.length > 0 + Jxedt::CachePucher.push(output_dir, targets, @force_push) end end end end end \ No newline at end of file