Class: Pod::Command::Repo::Push
- Inherits:
-
Pod::Command::Repo
- Object
- Pod::Command
- Pod::Command::Repo
- Pod::Command::Repo::Push
- Defined in:
- lib/cocoapods-bb-bin/native/push.rb
Instance Method Summary collapse
-
#initialize(argv) ⇒ Push
constructor
A new instance of Push.
-
#validate_podspec_files ⇒ Object
Performs a full lint against the podspecs.
Constructor Details
#initialize(argv) ⇒ Push
Returns a new instance of Push.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/cocoapods-bb-bin/native/push.rb', line 10 def initialize(argv) @allow_warnings = argv.flag?('allow-warnings') @local_only = argv.flag?('local-only') @repo = argv.shift_argument @source = source_for_repo @source_urls = argv.option('sources', config.sources_manager.all.map(&:url).append(Pod::TrunkSource::TRUNK_REPO_URL).uniq.join(',')).split(',') @update_sources = argv.flag?('update-sources') @podspec = argv.shift_argument @use_frameworks = !argv.flag?('use-libraries') @use_modular_headers = argv.flag?('use-modular-headers', false) @use_static_frameworks = argv.flag?('use-static-frameworks') @private = argv.flag?('private', true) @message = argv.option('commit-message') @commit_message = argv.flag?('commit-message', false) @use_json = argv.flag?('use-json') @swift_version = argv.option('swift-version', nil) @skip_import_validation = argv.flag?('skip-import-validation', false) @skip_tests = argv.flag?('skip-tests', false) @allow_overwrite = argv.flag?('overwrite', true) super @use_cocoapods_validator = argv.flag?('cocoapods-validator', true)# 配置参数cocoapods进行验证,内部进行hook,二进制hook,源码cocoapods进行验证 end |
Instance Method Details
#validate_podspec_files ⇒ Object
Performs a full lint against the podspecs.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/cocoapods-bb-bin/native/push.rb', line 35 def validate_podspec_files UI.puts "\nbin Validating #{'spec'.pluralize(count)}".yellow podspec_files.each do |podspec| validator = Validator.new(podspec, @source_urls, [], @use_cocoapods_validator) validator.allow_warnings = @allow_warnings validator.use_frameworks = @use_frameworks validator.use_static_frameworks = @use_static_frameworks validator.use_modular_headers = @use_modular_headers validator.ignore_public_only_results = @private validator.swift_version = @swift_version validator.skip_import_validation = @skip_import_validation validator.skip_tests = @skip_tests begin validator.validate rescue => e raise Informative, "The `#{podspec}` specification does not validate." \ "\n\n#{e.}" end raise Informative, "The `#{podspec}` specification does not validate." unless validator.validated? end end |