lib/vx/builder/script_builder/go.rb in vx-builder-0.4.0 vs lib/vx/builder/script_builder/go.rb in vx-builder-0.5.0

- old
+ new

@@ -6,19 +6,16 @@ DEFAULT_GO = '1.2' def call(env) if enabled?(env) - do_before_install(env) do |i| + vxvm_install(env, 'go', go_version(env)) - vxvm_install = "sudo vxvm install go #{go_version env}" - i << trace_sh_command(%{VX_VM_SOURCE="$(#{vxvm_install})"}, trace: vxvm_install) - i << %{source "$VX_VM_SOURCE"} - - i << trace_sh_command('export VX_GOPATH=$VX_ROOT/gopath:$GOPATH') - i << trace_sh_command('export PATH=$VX_GOPATH/bin:$PATH') + do_before_install(env) do |i| + i << trace_sh_command('export GOPATH=$VX_ROOT/gopath:$GOPATH') + i << trace_sh_command('export PATH=$VX_ROOT/gopath/bin:$PATH') i << trace_sh_command('export VX_ORIG_CODE_ROOT=$(pwd)') - i << trace_sh_command("export VX_NEW_CODE_ROOT=$VX_GOPATH/src/#{project_path env}") + i << trace_sh_command("export VX_NEW_CODE_ROOT=$VX_ROOT/gopath/src/#{project_path env}") i << trace_sh_command('mkdir -p $VX_NEW_CODE_ROOT') i << trace_sh_command('rmdir $VX_NEW_CODE_ROOT') i << trace_sh_command('mv $VX_ORIG_CODE_ROOT $VX_NEW_CODE_ROOT') i << trace_sh_command('ln -s $VX_NEW_CODE_ROOT $VX_ORIG_CODE_ROOT')