Files
John Brooker 7cf5294b09 Vagrant: Build checked out Rocket
Previously the vagrant configuration would grab the last release
of Rocket to build. Now Rocket will be built on whatever is in the
checked out git repository (/vagrant inside the VM)

This will allow testing of changes to Rocket using the "vagrant
provision" command.
It will also automatically use the latest rocket version.

Assumes ./build script handles cleanup.

Go and APPC versions still manually configured in provisioning scripts
2015-03-20 17:05:35 -07:00

32 lines
634 B
Bash

#!/bin/bash
set -x
export DEBIAN_FRONTEND=noninteractive
VERSION=1.4.1
OS=linux
ARCH=amd64
prefix=/usr/local
# grab go
if ! [ -e $prefix/go ]; then
wget -q https://storage.googleapis.com/golang/go$VERSION.$OS-$ARCH.tar.gz
sudo tar -C $prefix -xzf go$VERSION.$OS-$ARCH.tar.gz
fi
# setup user environment variables
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
[ -e $GOPATH ] || mkdir -p $GOPATH
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
EOF
# not essential but go get depends on it
which git || sudo apt-get install -y git