Class: PodAlexandria::CIPostInstallHook

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-alexandria/env_ci/post_install.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(installer_context, user_options) ⇒ CIPostInstallHook

Returns a new instance of CIPostInstallHook.



5
6
7
8
9
10
# File 'lib/cocoapods-alexandria/env_ci/post_install.rb', line 5

def initialize(installer_context, user_options)
  @installer_context = installer_context
  @pods_project = installer_context.pods_project
  @cache = FrameworkCache.new(installer_context)
  @options = UserOptions.new(installer_context, user_options)
end

Instance Attribute Details

#cacheObject (readonly)

Returns the value of attribute cache.



3
4
5
# File 'lib/cocoapods-alexandria/env_ci/post_install.rb', line 3

def cache
  @cache
end

#installer_contextObject (readonly)

Returns the value of attribute installer_context.



3
4
5
# File 'lib/cocoapods-alexandria/env_ci/post_install.rb', line 3

def installer_context
  @installer_context
end

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/cocoapods-alexandria/env_ci/post_install.rb', line 3

def options
  @options
end

#pods_projectObject (readonly)

Returns the value of attribute pods_project.



3
4
5
# File 'lib/cocoapods-alexandria/env_ci/post_install.rb', line 3

def pods_project
  @pods_project
end

Instance Method Details

#runObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/cocoapods-alexandria/env_ci/post_install.rb', line 12

def run
  Pod::UI.title "Compile dependencies"
  
  if options.disable_bitcode
    Pod::UI.puts "Disabling bitcode generation"
    pods_project.disable_bitcode_generation
  elsif options.force_bitcode
    Pod::UI.puts "!!DEPRECTATED!! Forcing bitcode generation"
    pods_project.force_bitcode_generation
  end
  pods_project.fix_deployment_target_warnings(options.minimum_ios_version)
  pods_project.fix_bundle_code_signing
  cache.delete_changed_frameworks
  cache.build_frameworks
  cache.cache_lockfile

  Pod::UI.title "Generating project using XcodeGen"
  XcodeGen::generate_dependencies(installer_context, options)
  XcodeGen::generate
end