Module: PodPrebuild

Defined in:
lib/cocoapods-binary-ht/prebuild_output/output.rb,
lib/command/config.rb,
lib/command/helper/zip.rb,
lib/command/executor/base.rb,
lib/cocoapods-binary-ht/env.rb,
lib/command/executor/pusher.rb,
lib/command/executor/fetcher.rb,
lib/command/executor/prebuilder.rb,
lib/command/executor/visualizer.rb,
lib/cocoapods-binary-ht/helper/json.rb,
lib/cocoapods-binary-ht/state_store.rb,
lib/cocoapods-binary-ht/diagnosis/base.rb,
lib/cocoapods-binary-ht/cache/validator.rb,
lib/cocoapods-binary-ht/helper/lockfile.rb,
lib/cocoapods-binary-ht/hooks/pre_install.rb,
lib/cocoapods-binary-ht/hooks/post_install.rb,
lib/cocoapods-binary-ht/diagnosis/diagnosis.rb,
lib/cocoapods-binary-ht/cache/validator_base.rb,
lib/cocoapods-binary-ht/diagnosis/integration.rb,
lib/cocoapods-binary-ht/cache/validation_result.rb,
lib/cocoapods-binary-ht/pod-binary/helper/build.rb,
lib/cocoapods-binary-ht/pod-rome/xcodebuild_raw.rb,
lib/cocoapods-binary-ht/cache/validator_dev_pods.rb,
lib/cocoapods-binary-ht/prebuild_output/metadata.rb,
lib/cocoapods-binary-ht/cache/validator_exclusion.rb,
lib/cocoapods-binary-ht/cache/validator_accumulated.rb,
lib/cocoapods-binary-ht/pod-rome/xcodebuild_command.rb,
lib/cocoapods-binary-ht/cache/validator_non_dev_pods.rb,
lib/cocoapods-binary-ht/cache/validator_with_podfile.rb,
lib/cocoapods-binary-ht/cache/validator_dependencies_graph.rb

Overview

Copyright 2019 panda Holdings PTE LTE (panda), All rights reserved. Use of this source code is governed by an MIT-style license that can be found in the LICENSE file

Defined Under Namespace

Modules: ZipUtils Classes: AccumulatedCacheValidator, BaseCacheValidator, BaseDiagnosis, CacheFetcher, CachePrebuilder, CachePusher, CacheValidationResult, CacheValidator, CommandExecutor, Config, DependenciesGraphCacheValidator, DevPodsCacheValidator, Diagnosis, Env, ExclusionCacheValidator, IntegrationDiagnosis, JSONFile, Lockfile, Metadata, NonDevPodsCacheValidator, Output, PodfileChangesCacheValidator, PostInstallHook, PreInstallHook, State, Visualizer, XcodebuildCommand

Class Method Summary collapse

Class Method Details

.build(options) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/cocoapods-binary-ht/pod-binary/helper/build.rb', line 5

def self.build(options)
  targets = options[:targets] || []
  return if targets.empty?

  options[:sandbox] = Pod::Sandbox.new(Pathname(options[:sandbox])) unless options[:sandbox].is_a?(Pod::Sandbox)
  options[:build_dir] = build_dir(options[:sandbox].root)

  case targets[0].platform.name
  when :ios, :tvos, :watchos
    PodPrebuild::XcodebuildCommand.new(options).run
  when :osx
    xcodebuild(
      sandbox: options[:sandbox],
      targets: targets,
      configuration: options[:configuration],
      sdk: "macosx",
      args: options[:args]
    )
  else
    raise "Unsupported platform for '#{targets[0].name}': '#{targets[0].platform.name}'"
  end
  raise "The build directory was not found in the expected location" unless options[:build_dir].directory?
end

.build_dir(sandbox_root) ⇒ Object



34
35
36
# File 'lib/cocoapods-binary-ht/pod-binary/helper/build.rb', line 34

def self.build_dir(sandbox_root)
  sandbox_root.parent + "build"
end

.configObject



4
5
6
# File 'lib/command/config.rb', line 4

def self.config
  PodPrebuild::Config.instance
end

.remove_build_dir(sandbox_root) ⇒ Object



29
30
31
32
# File 'lib/cocoapods-binary-ht/pod-binary/helper/build.rb', line 29

def self.remove_build_dir(sandbox_root)
  path = build_dir(sandbox_root)
  path.rmtree if path.exist?
end

.stateObject



2
3
4
# File 'lib/cocoapods-binary-ht/state_store.rb', line 2

def self.state
  @state ||= State.new
end