Class: Vx::Builder::ScriptBuilderV2::Java

Inherits:
Base
  • Object
show all
Defined in:
lib/vx/builder/script_builder_v2/java.rb

Instance Attribute Summary

Attributes inherited from Base

#app

Instance Method Summary collapse

Methods inherited from Base

#deploy?, #do_after_deploy, #do_before_deploy, #do_before_script, #do_cache_key, #do_cached_directories, #do_database, #do_deploy_script, #do_install, #do_script

Instance Method Details

#call(env) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/vx/builder/script_builder_v2/java.rb', line 7

def call(env)
  if version = java(env)
    do_cache_key(env) do |i|
      i << "jdk-#{version}"
    end

    env.stage("install").tap do |i|
      i.add_task "jdk",  "action" => "install", "version" => version
    end
=begin
    env.stage("before_install").tap do |i|
    end

    do_before_install(env) do |i|
      i << "source $(which jdk_switcher.sh)"
      i << trace_sh_command("jdk_switcher use #{java env}")
    end
=end

  end

  app.call(env)
end