class Pod::Command::Repo::Push::HBH

Public Class Methods

new(argv) click to toggle source

pod repo push HBHSpecs HBHNetwork.podspec、 –sources='gitlab.jiehun.tech/App/iOS/Modularization/HBHSpecs.git,https://github.com/CocoaPods/Specs' –allow-warnings

Calls superclass method
# File lib/cocoapods-hbh/command/common/push.rb, line 10
def initialize(argv)
    super
    hbh_specs_env = HBHConfig.config.hbh_specs_env

    @podspec = find_podspec if @podspec.blank?

    # specification = Specification.from_file(@podspec)
               
    @source_urls = [
        "http://gitlab.jiehun.tech/App/iOS/Modularization/HBHSpecs",
        "'https://github.com/CocoaPods/Specs.git'"] if @source_urls.blank?

    @allow_warnings = true
end

Public Instance Methods

find_podspec() click to toggle source

Dir.glob 可替代

# File lib/cocoapods-hbh/command/common/push.rb, line 25
def find_podspec
name = nil
    Pathname.pwd.children.each do |child|
        if File.file?(child)
            if child.extname == ".podspec"
            name = File.basename(child)
            return name
            end
        end
    end
  return name
end