diff --git a/Vagrantfile b/Vagrantfile index 5923756..483275f 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -11,7 +11,5 @@ Vagrant.configure('2') do |config| config.vm.provision :shell, :privileged => false, :path => "scripts/vagrant/install-go.sh" # Install Rocket - # FIXME: changing the versions recorded in this file and re-run "vagrant provision" wont - # upgrade your VM instance. you need to destroy and start from scratch config.vm.provision :shell, :privileged => false, :path => "scripts/vagrant/install-rocket.sh" end diff --git a/scripts/vagrant/install-go.sh b/scripts/vagrant/install-go.sh index 87e2021..83df383 100644 --- a/scripts/vagrant/install-go.sh +++ b/scripts/vagrant/install-go.sh @@ -17,7 +17,7 @@ if ! [ -e $prefix/go ]; then fi # setup user environment variables -echo "export GOROOT=$prefix/go" |sudo tee /etc/profile.d/go.sh +echo "export GOROOT=$prefix/go" |sudo tee /etc/profile.d/01go.sh cat << 'EOF' |sudo tee -a /etc/profile.d/go.sh export GOPATH=$HOME/.gopath diff --git a/scripts/vagrant/install-rocket.sh b/scripts/vagrant/install-rocket.sh index b8ba458..46ab91e 100644 --- a/scripts/vagrant/install-rocket.sh +++ b/scripts/vagrant/install-rocket.sh @@ -3,7 +3,6 @@ set -xe export DEBIAN_FRONTEND=noninteractive -ROCKET_VERSION=0.4.2 APP_SPEC_VERSION=0.4.1 if ! [ -d app-spec ]; then @@ -17,21 +16,10 @@ if ! [ -d app-spec ]; then popd fi -if ! [ -d rocket ]; then - echo "Install rocket ${ROCKET_VERSION}" - mkdir rocket - - # install deps - which unsquashfs || sudo apt-get install -y squashfs-tools - - # grab rocket - wget -q -O rocket.tar.gz https://github.com/coreos/rocket/archive/v${ROCKET_VERSION}.tar.gz - tar xzvf rocket.tar.gz -C rocket --strip-components=1 - - # build/install rocket - pushd rocket - ./build - sudo cp -v bin/* /usr/local/bin - popd -fi +pushd /vagrant +./build +cat << EOF | sudo tee /etc/profile.d/99rkt.sh + export PATH=$PWD/bin:\$PATH + export GOPATH=$PWD/gopath:\$GOPATH +EOF