lib/cocoapods-imy-bin/command/bin/auto.rb in cocoapods-imy-bin-0.2.9.1 vs lib/cocoapods-imy-bin/command/bin/auto.rb in cocoapods-imy-bin-0.3.0.11
- old
+ new
@@ -19,11 +19,11 @@
['--framework-output', '输出framework文件'],
['--no-zip', '不压缩静态 framework 为 zip'],
['--all-make', '对该组件的依赖库,全部制作为二进制组件'],
['--configuration', 'Build the specified configuration (e.g. Release ). Defaults to Debug'],
['--env', "该组件上传的环境 %w[dev debug_iphoneos release_iphoneos]"]
- ]
+ ].concat(Pod::Command::Gen.options).concat(super).uniq
end
def initialize(argv)
@env = argv.option('env') || 'dev'
@@ -39,10 +39,11 @@
@zip = argv.flag?('zip', true)
@all_make = argv.flag?('all-make', false )
@verbose = argv.flag?('verbose',true)
@config = argv.option('configuration', 'Debug')
+ @additional_args = argv.remainder!
super
end
def run
@@ -54,11 +55,12 @@
fail_push_specs = []
sources_sepc.uniq.each do |spec|
begin
fail_push_specs << spec unless CBin::Upload::Helper.new(spec,@code_dependencies,@sources).upload
- rescue
+ rescue Object => exception
+ UI.puts exception
fail_push_specs << spec
end
end
if fail_push_specs.any?
@@ -84,18 +86,18 @@
end
end
#制作二进制包
- # `pod bin archive --verbose --code-dependencies --no-clean --sources=https://gitlab.xxx.com/iOS/imyspecs.git,https://cdn.cocoapods.org/ --use-libraries`
+
def run_archive
argvs = [
"--sources=#{sources_option(@code_dependencies, @sources)},https:\/\/cdn.cocoapods.org",
- "--use-libraries",
- "--verbose"
+ @additional_args
]
argvs << spec_file if spec_file
+ argvs.delete(Array.new)
unless @clean
argvs += ['--no-clean']
end
if @code_dependencies