6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/pod_builder/command/restore_all.rb', line 6
def self.call
unless Configuration.restore_enabled
raise "\n\nRestore not enabled!".red
end
Configuration.check_inited
PodBuilder::prepare_basepath
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
return Command::Build::call
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 -1
end
|