Sha256: 6f16c5ced3f218b07c3aff9dbc2c7364b87ff838a9f9a0c3788a6f5f877edacf

Contents?: true

Size: 1010 Bytes

Versions: 3

Compression:

Stored size: 1010 Bytes

Contents

module Vx
  module Builder
    class Script

      Base = Struct.new(:app) do

        include Helper::TraceShCommand

        def do_cache_key(env)
          yield env.cache_key
        end

        def do_script(env)
          if env.source.script.empty?
            yield env.script
          end
        end

        def do_cached_directories(env)
          if env.source.cached_directories != false
            yield env.cached_directories
          end
        end

        def do_announce(env)
          yield env.announce
        end

        def do_before_install(env)
          yield env.before_install
        end

        def do_install(env)
          yield env.install
        end

        def do_before_deploy(env)
          yield env.before_deploy
        end

        def do_after_deploy(env)
          yield env.after_deploy
        end

        def do_deploy(env)
          yield env.deploy
        end

        def deploy?
          env.task.deploy?
        end
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vx-builder-0.2.2 lib/vx/builder/script/base.rb
vx-builder-0.2.1 lib/vx/builder/script/base.rb
vx-builder-0.2.0 lib/vx/builder/script/base.rb