From 8c20f1920c42bc0acfbdb7549d953402d80ad9b7 Mon Sep 17 00:00:00 2001 From: Ivan Jaimes Date: Tue, 5 Apr 2016 17:39:34 -0500 Subject: [PATCH] Update golang to 1.6 --- Vagrantfile | 4 ++-- bin/golang.sh | 9 ++++++++- bin/setup.sh | 4 +--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index c2054e2..ff56907 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -6,11 +6,11 @@ VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| - config.vm.box_url = "https://github.com/ivan-iver/vagrant_golang/releases/download/v0.1/golang.box" -# config.vm.box_url = "/Users/Iver/VirtualBox VMs/ubuntu-14.04.box" + config.vm.box_url = "https://github.com/ivan-iver/vagrant_golang/releases/download/v0.2/golang.box" config.vm.box = "golangmx" config.vm.hostname = "gophers" config.vm.network "private_network", ip: "10.2.2.205" + config.vm.network :forwarded_port, guest: 22, host: 1234 config.vm.provision :shell do |shell| shell.path = "bin/setup.sh" shell.privileged = true diff --git a/bin/golang.sh b/bin/golang.sh index e8fa47a..7647918 100755 --- a/bin/golang.sh +++ b/bin/golang.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -export GOPACK=go1.5.1.linux-amd64.tar.gz +export GOPACK=go1.6.linux-amd64.tar.gz mkdir -p /home/vagrant/golang wget -nv --progress=dot:giga -O /home/vagrant/golang/${GOPACK} https://storage.googleapis.com/golang/${GOPACK} tar zxf /home/vagrant/golang/${GOPACK} -C /usr/local/ @@ -14,3 +14,10 @@ source ~/.bash_profile /usr/local/go/bin/go get -u -v sourcegraph.com/sqs/goreturns /usr/local/go/bin/go get -u -v golang.org/x/tools/cmd/gorename /usr/local/go/bin/go get -u -v github.com/derekparker/delve/cmd/dlv + +mkdir -p /usr/local/go +chown -R vagrant:vagrant /usr/local/go +mkdir -p /home/vagrant/go +mkdir -p /home/vagrant/go/pkg +mkdir -p /home/vagrant/go/bin +mkdir -p /home/vagrant/go/src diff --git a/bin/setup.sh b/bin/setup.sh index fde3f0c..07e199e 100755 --- a/bin/setup.sh +++ b/bin/setup.sh @@ -3,7 +3,5 @@ sed -i 's/^mesg n$/tty -s \&\& mesg n/g' /root/.profile apt-get update apt-get upgrade -y -apt-get install git mercurial mercurial-git -y +apt-get install git mercurial mercurial-git postgresql postgresql-contrib -y -mkdir -p /usr/local/go -chown -R vagrant:vagrant /usr/local/go