Vagrantfile 1.1 KB

1234567891011121314151617181920212223242526
  1. # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
  2. VAGRANTFILE_API_VERSION = "2"
  3. Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  4. config.vm.box = "hashicorp/precise64"
  5. config.vm.provision "shell", inline: "mkdir -p /home/vagrant/go"
  6. config.vm.synced_folder ".", "/home/vagrant/go/src/github.com/cloudfoundry/gosigar"
  7. config.vm.provision "shell", inline: "chown -R vagrant:vagrant /home/vagrant/go"
  8. install_go = <<-BASH
  9. set -e
  10. if [ ! -d "/usr/local/go" ]; then
  11. cd /tmp && wget https://storage.googleapis.com/golang/go1.3.3.linux-amd64.tar.gz
  12. cd /usr/local
  13. tar xvzf /tmp/go1.3.3.linux-amd64.tar.gz
  14. echo 'export GOPATH=/home/vagrant/go; export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin' >> /home/vagrant/.bashrc
  15. fi
  16. export GOPATH=/home/vagrant/go
  17. export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin
  18. /usr/local/go/bin/go get -u github.com/onsi/ginkgo/ginkgo
  19. /usr/local/go/bin/go get -u github.com/onsi/gomega;
  20. BASH
  21. config.vm.provision "shell", inline: 'apt-get install -y git-core'
  22. config.vm.provision "shell", inline: install_go
  23. end