18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/jenkins/plugin/cli/new.rb', line 18
def create_pluginspec
git_name = %x[git config user.name].chomp
git_email = %x[git config user.email].chomp
developer_id = git_email.split('@', 2).first || ''
git_name = 'TODO: Put your realname here' if git_name.empty?
git_email = '[email protected]' if git_email.empty?
opts = {
:developer_id => developer_id.empty? ? 'TODO: Put your jenkins-ci.org username here.' : developer_id,
:developer_name => "#{git_name} <#{git_email}>"
}
template('templates/pluginspec.tt', "#{name}/#{name}.pluginspec", opts)
end
|