Skip to content

Commit

Permalink
Merge pull request #51 from ripienaar/50
Browse files Browse the repository at this point in the history
(#50) use the unmunged name for executable names
  • Loading branch information
ripienaar authored Jan 20, 2020
2 parents 1600870 + 5f6614d commit fd52fbb
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/mcollective/pluginpackager/agent_definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ def initialize(configuration, mcdependency, plugintype)
@mcversion = mcdependency[:mcversion] || mcversion
@metadata[:version] = (configuration[:version] || @metadata[:version])
@dependencies << {:name => "#{@mcname}-common", :version => @mcversion}
@agent_name = @metadata[:name].downcase
@metadata[:name] = (configuration[:pluginname] || @metadata[:name]).downcase.gsub(/\s+|_/, "-")

identify_packages
end

Expand Down Expand Up @@ -52,17 +54,19 @@ def agent
agent[:plugindependency] = {:name => "#{@mcname}-#{@metadata[:name]}-common", :version => @metadata[:version], :revision => @revision}

if @metadata[:provider] == "external"
agent[:executable_files] << File.join(agentdir, @metadata[:name])
agent[:executable_files] << File.join(agentdir, @agent_name)
end

agent
end

# Obtain client package files and dependencies.
def client
client = {:files => [],
:dependencies => @dependencies.clone,
:description => "Client plugin for #{@metadata[:name]}"}
client = {
:files => [],
:dependencies => @dependencies.clone,
:description => "Client plugin for #{@metadata[:name]}"
}

clientdir = File.join(@path, "application")
aggregatedir = File.join(@path, "aggregate")
Expand Down

0 comments on commit fd52fbb

Please sign in to comment.