Sha256: 869c88846240582992ddc7aeaacdc67381d5a837a09559f47c44ce261556d12e

Contents?: true

Size: 1.13 KB

Versions: 4

Compression:

Stored size: 1.13 KB

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? && !env.source.deploy_modules?
            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_deploy_script(env)
          if env.source.deploy_modules?
            yield env.script
          end
        end

        def do_before_deploy(env)
          if env.source.deploy_modules?
            yield env.before_script
          end
        end

        def do_after_deploy(env)
          if env.source.deploy_modules?
            yield env.after_success
          end
        end

      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vx-builder-0.3.3 lib/vx/builder/script_builder/base.rb-e
vx-builder-0.3.2 lib/vx/builder/script_builder/base.rb-e
vx-builder-0.3.1 lib/vx/builder/script_builder/base.rb-e
vx-builder-0.3.0 lib/vx/builder/script_builder/base.rb-e