Class: Release
Instance Method Summary
collapse
Methods included from Utilities
#ask, #echo_with_color, #help_info, #next_snapshot, #read_file, #right_padding, #terminate, #verify_pattern, #verify_pattern_terminate, #wait_or_do, #write_file
Instance Method Details
#replace_vars(yaml_content) ⇒ Object
29
30
31
32
33
34
35
|
# File 'lib/release/release.rb', line 29
def replace_vars(yaml_content)
yaml_content % {
:release_branch => @release_model.release_branch,
:release_version => @release_model.release_version,
:next_version => @release_model.next_version
}
end
|
#run_yaml(yaml_path) ⇒ Object
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/release/release.rb', line 8
def run_yaml(yaml_path)
@release_model = ReleaseModel.new
wait_or_do "\nStarting the release process" do
terminate
end
puts
release = ReleaseProcess.new(@release_model.dry_run, @release_model.snapshots)
config = YAML::load_file(yaml_path)
index=1
config.each do |section_description, commands|
variables_replaced = commands.map { |command| replace_vars(command) }
release.step("#{index}. #{replace_vars section_description}",variables_replaced)
index+=1
end
end
|