Sha256: 3a2e434a91ee6217964017cf5f43e0b30230d7ef76dfcb0ffba6c5b9a5e4bdb6

Contents?: true

Size: 1015 Bytes

Versions: 159

Compression:

Stored size: 1015 Bytes

Contents

require 'parallel'

module Pod
  class Command
    class Bin < Command
      class Repo < Bin
        class Update < Repo
          self.summary = '更新私有源'

          self.arguments = [
            CLAide::Argument.new('NAME', false)
          ]

          def self.options
            [
              ['--all', '更新所有私有源,默认只更新二进制相关私有源']
            ].concat(super)
          end

          def initialize(argv)
            @all = argv.flag?('all')
            @name = argv.shift_argument
            super
          end

          def run
            show_output = !config.silent?
            if @name || @all
              config.sources_manager.update(@name, show_output)
            else
              Parallel.each(valid_sources, in_threads: 4) do |source|
                UI.puts "更新私有源仓库 #{source.to_s}".yellow
                source.update(show_output)
              end
            end
          end


        end
      end
    end
  end
end

Version data entries

159 entries across 159 versions & 7 rubygems

Version Path
cocoapods-tdf-bin-0.0.22 lib/cocoapods-tdf-bin/command/bin/repo/update.rb
cocoapods-imy-hycan-bin-0.1.6 lib/cocoapods-imy-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.1.8.1 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-tdf-bin-0.0.21 lib/cocoapods-tdf-bin/command/bin/repo/update.rb
cocoapods-tdf-bin-0.0.20 lib/cocoapods-tdf-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.1.8 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-tdf-bin-0.0.19 lib/cocoapods-tdf-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.1.7 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-tdf-bin-0.0.18 lib/cocoapods-tdf-bin/command/bin/repo/update.rb
cocoapods-tdf-bin-0.0.17 lib/cocoapods-tdf-bin/command/bin/repo/update.rb
cocoapods-imy-hycan-bin-0.1.5 lib/cocoapods-imy-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.1.6 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.1.5 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.1.4 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.1.3 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.1.2 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.1.1 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-bb-bin-0.1.0 lib/cocoapods-bb-bin/command/bin/repo/update.rb
cocoapods-imy-hycan-bin-0.1.3 lib/cocoapods-imy-bin/command/bin/repo/update.rb
cocoapods-imy-hycan-bin-0.1.2 lib/cocoapods-imy-bin/command/bin/repo/update.rb