7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/build_graph/sha_calculator.rb', line 7
def calculate(node)
return if node.sha
dependency_shas = []
node.dependencies.each do |dependency_node|
calculate(dependency_node)
dependency_shas.push(dependency_node.sha)
end
auxiliary_file = Tempfile.new(node.name)
build_settings = node.build_settings.filtered_to_string
save_auxiliary_data(build_settings, dependency_shas, auxiliary_file)
input_paths = list_input_paths(node)
node.sha = calculate_sha(input_paths + [auxiliary_file.path])
auxiliary_file.close(true)
end
|