lib/vx/builder/script_builder/prepare.rb in vx-builder-0.3.10 vs lib/vx/builder/script_builder/prepare.rb in vx-builder-0.3.11

- old
+ new

@@ -22,11 +22,13 @@ scm = build_scm(env, sha, repo_path) git_ssh = scm.git_ssh_content(deploy_key && "#{key_file}") env.init.tap do |i| i << 'export VX_ROOT=$(pwd)' + i << 'export PATH=$VX_ROOT/bin:$PATH' + i << "mkdir -p $VX_ROOT/bin" i << "mkdir -p #{data_path}" i << "mkdir -p #{repo_path}" if deploy_key i << upload_sh_command(key_file, deploy_key) @@ -39,14 +41,18 @@ i << "export GIT_SSH=#{git_ssh_file}" i << scm.fetch_cmd i << "unset GIT_SSH" - i << 'echo "Starting SSH Agent"' - i << 'eval "$(ssh-agent)"' - i << "ssh-add $VX_PRIVATE_KEY" + i << 'echo "starting SSH Agent"' + i << 'eval "$(ssh-agent)" > /dev/null' + i << "ssh-add $VX_PRIVATE_KEY 2> /dev/null" i << "cd #{repo_path}" + + i << 'echo "download latest version of vxvm"' + i << "curl --fail --silent --show-error https://raw.githubusercontent.com/vexor/vx-packages/master/vxvm > $VX_ROOT/bin/vxvm" + i << "chmod +x $VX_ROOT/bin/vxvm" end env.after_script_init.tap do |i| i << 'export VX_ROOT=$(pwd)' i << "cd #{repo_path}"