68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
# File 'lib/chef/knife/community_release.rb', line 68
def run
self.setup
ui.msg "Starting to validate the envrionment before changing anything..."
validate_cookbook_exists
validate_repo
validate_repo_clean
validate_version_sanity
validate_no_existing_tag(get_tag_string)
validate_target_remote_branch
ui.msg "All validation steps have passed, making changes..."
set_new_cb_version
commit_new_cb_version
tag_new_cb_version(get_tag_string)
if config[:git_push]
git_push_commits
git_push_tags
end
if config[:site_share]
confirm_share_msg = "Shall I release version #{@version} of the"
confirm_share_msg << " #{@cb_name} cookbook to the community site? (Y/N) "
if config[:yes] || (ask_question(confirm_share_msg).chomp.upcase == "Y")
share_new_version
ui.msg "Version #{@version} of the #{@cb_name} cookbook has been released!"
ui.msg "Check it out at http://ckbk.it/#{@cb_name}"
end
end
if config[:devodd]
puts "I'm odd!"
end
end
|