diff --git a/lib/comfpile/artefact.rb b/lib/comfpile/artefact.rb index 94afe99..6f4aa79 100644 --- a/lib/comfpile/artefact.rb +++ b/lib/comfpile/artefact.rb @@ -137,14 +137,18 @@ module Comfpile @parent_artefact = require_artefact(stage, target) end - def include_artefact(stage, target) - artefact = require_artefact(stage, target) + def include_artefact(stage, target, **opts) + artefact = require_artefact(stage, target, **opts) @included_artefacts << artefact + + artefact end - def require_artefact(stage, target) - artefact = reference_artefact(stage, target, required: true) + def require_artefact(stage, target, **opts) + artefact = reference_artefact(stage, target, required: true, **opts) @required_artefacts << artefact + + artefact end def reference_artefact(stage, target, required: false) @@ -164,7 +168,6 @@ module Comfpile artefact end - # # Find or create a new artefact # # @param [Symbol] stage The type of item to create.