Sha256: 9ac649b8ea15358fb4a7728bced8fc0cbd9cc7ca9fed215163c9c3aafc183c24

Contents?: true

Size: 627 Bytes

Versions: 27

Compression:

Stored size: 627 Bytes

Contents

require File.dirname(__FILE__) + '/base' unless defined?(Capper)

Capper.load do
  # execute the specified stage so that recipes required in stage can contribute to task list
  on :load do
    if stages.include?(ARGV.first)
      find_and_execute_task(ARGV.first) if ARGV.any?{ |option| option =~ /-T|--tasks|-e|--explain/ }
    end
  end

  namespace :multistage do
    task :ensure do
      unless exists?(:current_stage)
        abort "No stage specified. Please specify one of: #{stages.join(', ')} (e.g. `cap #{stages.first} #{ARGV.last}')"
      end
    end
  end

  on :start, "multistage:ensure", :except => stages
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
capper-0.7.3 lib/capper/multistage.rb
capper-0.7.2 lib/capper/multistage.rb
capper-0.7.1 lib/capper/multistage.rb
capper-0.7.0 lib/capper/multistage.rb
capper-0.6.8 lib/capper/multistage.rb
capper-0.6.7 lib/capper/multistage.rb
capper-0.6.6 lib/capper/multistage.rb
capper-0.6.5 lib/capper/multistage.rb
capper-0.6.4 lib/capper/multistage.rb
capper-0.6.3 lib/capper/multistage.rb
capper-0.6.2 lib/capper/multistage.rb
capper-0.6.1 lib/capper/multistage.rb
capper-0.6.0 lib/capper/multistage.rb
capper-0.5.0 lib/capper/multistage.rb
capper-0.4.0 lib/capper/multistage.rb
capper-0.3.6 lib/capper/multistage.rb
capper-0.3.5 lib/capper/multistage.rb
capper-0.3.4 lib/capper/multistage.rb
capper-0.3.3 lib/capper/multistage.rb
capper-0.3.2 lib/capper/multistage.rb