Sha256: be83c4d00d92d26e2ab38a5de9b5c21d0bf0436294e86bc1483b950b2cb641bc
Contents?: true
Size: 1.54 KB
Versions: 5
Compression:
Stored size: 1.54 KB
Contents
require 'cocoapods' require_relative '../source/core/run_helper' module OrmDev class Command class Run < Command self.summary = '运行插件发布整个流程[检查运行环境、framwork、zip]' self.description = <<-DESC 运行插件发布整个流程. 指定'插件名.podspec'的路径`PATH`。 DESC self.arguments = [ CLAide::Argument.new('PATH', false) ] def self.options [ ].concat(super) end def initialize(argv) @podspec_file = argv.shift_argument @podspec_files = Pathname.pwd.children.select { |pn| pn.extname == '.podspec' } super end def validate! super # raise Pod::Informative, "No `Cimfile' found in the project directory." unless @cipfile_path.exist? if @podspec_file help! "podspec file at #{@podspec_file} does not exist" unless File.exist? @podspec_file @podspec_path = @podspec_file else raise Pod::Informative, 'No podspec file found, please specify one' unless @podspec_files.length > 0 raise Pod::Informative, 'Multiple podspec file found, please specify one' unless @podspec_files.length == 1 @podspec_path = @podspec_files.first end end def run super OrmDev::LogUtil.info '[插件发布] '.green installer = OrmDev::RunHelper.new(@podspec_path) installer.setup() OrmDev::LogUtil.info "Success!!! Please run command:\n orm ipa \#{platform}" end end end end
Version data entries
5 entries across 5 versions & 1 rubygems