Sha256: 0aa5cf4dab5c545843d5febd4b61c92a6c91823ee93d0ff6b218f348505f0a23

Contents?: true

Size: 1.62 KB

Versions: 7

Compression:

Stored size: 1.62 KB

Contents

require_relative "executor/prebuilder"
require_relative "../cocoapods-binary-cache/pod-binary/prebuild_dsl"

module Pod
  class Command
    class Binary < Command
      class Prebuild < Binary
        attr_reader :prebuilder

        self.arguments = [CLAide::Argument.new("CACHE-BRANCH", false)]
        def self.options
          [
            ["--config", "Config (Debug, Test...) to prebuild"],
            ["--repo-update", "Update pod repo before installing"],
            ["--no-fetch", "Do not perform a cache fetch beforehand"],
            ["--push", "Push cache to repo upon completion"],
            ["--all", "Prebuild all binary pods regardless of cache validation"],
            ["--targets", "Targets to prebuild. Use comma (,) to specify a list of targets"]
          ].concat(super)
        end

        def initialize(argv)
          super
          prebuild_all_pods = argv.flag?("all")
          prebuild_targets = argv.option("targets", "").split(",")
          update_cli_config(
            :prebuild_job => true,
            :prebuild_all_pods => prebuild_all_pods,
            :prebuild_config => argv.option("config")
          )
          update_cli_config(:prebuild_targets => prebuild_targets) unless prebuild_all_pods
          @prebuilder = PodPrebuild::CachePrebuilder.new(
            config: prebuild_config,
            cache_branch: argv.shift_argument || "master",
            repo_update: argv.flag?("repo-update"),
            no_fetch: argv.flag?("fetch") == false,
            push_cache: argv.flag?("push")
          )
        end

        def run
          @prebuilder.run
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
cocoapods-binary-cache-next-0.1.16 lib/command/prebuild.rb
cocoapods-binary-cache-next-0.1.15 lib/command/prebuild.rb
cocoapods-binary-cache-0.1.14 lib/command/prebuild.rb
cocoapods-binary-cache-0.1.13 lib/command/prebuild.rb
cocoapods-binary-cache-0.1.12 lib/command/prebuild.rb
cocoapods-binary-cache-0.1.11 lib/command/prebuild.rb
cocoapods-binary-cache-0.1.10 lib/command/prebuild.rb