Sha256: 3e90699036d591bd7d13fb36b2bd9e9b8303be159bcfa859518df5147ec50862
Contents?: true
Size: 569 Bytes
Versions: 38
Compression:
Stored size: 569 Bytes
Contents
module Capper module Utils module Multistage def stage(name, &block) stages = fetch(:stages, []) if stages.include?(name) abort "Multiple stages with the same name are not allowed" end namespace :multistage do task(name, {}, &block) end desc "Set the target stage to `#{name}'." task(name) do set(:current_stage, name.to_sym) find_and_execute_task("multistage:#{name}") end set(:stages, [stages, name].flatten) end end end end
Version data entries
38 entries across 38 versions & 1 rubygems