feat: port artefact context to other functions

This commit is contained in:
David Bailey 2023-04-20 09:49:54 +02:00
parent 1878186c4f
commit fe23382dcc
5 changed files with 29 additions and 28 deletions

View file

@ -32,14 +32,14 @@ module Comfpile
@root_path = options[:root_path]
end
def craft(stage, target)
def craft(stage, target, context)
return nil unless stage == :sourcefile
full_path = File.join(@root_path, target)
return nil unless File.exists? full_path
FilesourceArtefact.new(@core, self, stage, target,
FilesourceArtefact.new(@core, self, stage, target, context,
file: full_path);
end
end