feat: add craft_and_complete function to create and execute artefacts

This commit is contained in:
David Bailey 2023-04-14 10:28:13 +02:00
parent 96f54f13b6
commit 807397bee0

View file

@ -154,5 +154,16 @@ module Comfpile
puts "Done after #{step_count} exec loops..."
end
def craft_and_complete(stage, target)
artefact = craft_artefact(stage, target)
return nil if artefact.nil?
while artefact.in_progress?
execute_step
end
artefact
end
end
end