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

Merge branch '11-build-base-directory' into 'master'

Resolve "Build base directory"

Closes #11

See merge request !20
parents 07163b72 b34edd4d
Pipeline #94409474 passed with stage
in 1 minute and 13 seconds
......@@ -95,8 +95,11 @@ module PowerStencil
def build_entity(entity_to_build, target_path)
initial_directory = Dir.pwd
target_plugin_name = entity_to_build.buildable_by.to_s
default_build entity_to_build, target_path
# Post processing executed from generated directory (#11)
Dir.chdir target_path
if target_plugin_name.empty?
post_build_hook entity_to_build, target_path
......@@ -106,6 +109,8 @@ module PowerStencil
raise PowerStencil::Error, "Plugin '#{target_plugin_name}' has no build capability !" unless target_plugin.capabilities[:build]
target_plugin.post_build_hook entity_to_build, target_path
Dir.chdir initial_directory
def default_build(entity_to_build, target_path)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment