github.com/dahs81/otto@v0.2.1-0.20160126165905-6400716cf085/builtin/app/go/data/common/dev-dep/build.sh.tpl (about) 1 #!/bin/bash 2 # 3 # Auto-generated by Otto. 4 # 5 # This is the build script for a Go-based project. 6 set -e 7 8 ol() { echo "[otto] $@"; } 9 10 # Set this to fake the bashrc on some platforms that we're interactive. 11 # Ubuntu in particular by default won't load the bashrc if this isn't 12 # set. 13 export PS1="> " 14 15 # Source our profile so we get our path properly setup 16 . /home/vagrant/.bashrc 17 18 # Go into our working directory 19 cd {{ shared_folder_path }} 20 21 # Get all the dependencies 22 ol "Getting dependencies..." 23 go get -v ./... 24 25 # Build the project and write the output into our shared directory 26 # with the compiled directory so that we can easily extract it. 27 ol "Building..." 28 go build -o "/otto-cache/dev-dep-output"