Skip to content

Commit

Permalink
Pod install.
Browse files Browse the repository at this point in the history
  • Loading branch information
James Campbell committed Mar 11, 2016
1 parent 60ece71 commit 56908ab
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions lib/cocoapods-deploy/command/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,27 68,31 @@ def find_cached_set(dependency)
end
end

# Installed required sources.
# Installs required sources for lockfile.
def install_sources_for_lockfile

lockfile_hash = config.lockfile.to_hash
pods_hash = internal_data['PODS']

pods.each do |pod|
pod = pod.keys.first unless pod.is_a?(String)
pod = pod.keys.first if pod.is_a?(Hash)
install_sources_for_pod(pod)

# TODO: Download Internal

transformer = DeployTransformer.new(config.lockfile, config.sandbox)
dep = transformer.transform_dependency_name(pod)
source = ExternalSources.from_dependency(dep, config.podfile.defined_in_file)
source.fetch(config.sandbox)
if pod.is_a?(Hash)
pods = pod.values.first
pods.each do |pod|
install_sources_for_pod(pod)
end
end
end
end

puts pods_hash
exit

end
# Installs required sources for pod.
def install_sources_for_pod(pod)
transformer = DeployTransformer.new(config.lockfile, config.sandbox)
dep = transformer.transform_dependency_name(pod)
source = ExternalSources.from_dependency(dep, config.podfile.defined_in_file)
source.fetch(config.sandbox)
end

# Triggers the CocoaPods install process
Expand Down

0 comments on commit 56908ab

Please sign in to comment.