6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/pod_builder/command/restore_all.rb', line 6
def self.call(options)
Configuration.check_inited
PodBuilder::prepare_basepath
ret = false
begin
File.rename(PodBuilder::basepath("Podfile"), PodBuilder::basepath("Podfile.tmp2"))
File.rename(PodBuilder::basepath("Podfile.restore"), PodBuilder::basepath("Podfile"))
ARGV << "*"
options[:skip_prebuild_update] = true
ret = Command::Build::call(options)
rescue Exception => e
raise e
ensure
FileUtils.rm_f(PodBuilder::basepath("Podfile.restore"))
File.rename(PodBuilder::basepath("Podfile"), PodBuilder::basepath("Podfile.restore"))
File.rename(PodBuilder::basepath("Podfile.tmp2"), PodBuilder::basepath("Podfile"))
end
return ret
end
|