Commit 5c7cb536 authored by Laurent Briais's avatar Laurent Briais

Better build delegation to plugin when an entity is declared as buildable by a plugin:

- build files generation is conditioned to existence of `:generate_build_files` capability
- post generation action has to exist in plugin
parent 6e2f1c97
Pipeline #96982145 passed with stage
in 1 minute and 5 seconds
......@@ -126,8 +126,12 @@ module PowerStencil
else
target_plugin = project.plugins[target_plugin_name]
raise PowerStencil::Error, "Could not find plugin '#{target_plugin_name}' !" if target_plugin.nil?
raise PowerStencil::Error, "Plugin '#{target_plugin_name}' has no file generation capability !" unless target_plugin.capabilities[:generate_build_files]
target_plugin.generate_build_files entity_to_build, target_path
if target_plugin.capabilities[:generate_build_files]
target_plugin.generate_build_files entity_to_build, target_path
else
logger.info 'Falling back to PowerStencil core build files generation process...'
generate_build_files entity_to_build, target_path
end
end
# Post processing executed from generated directory (#11)
......
module PowerStencil
VERSION = '0.9.5'.freeze
VERSION = '0.9.6'.freeze
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment