diff options
Diffstat (limited to '.sandstorm/build.sh')
| -rw-r--r-- | .sandstorm/build.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/.sandstorm/build.sh b/.sandstorm/build.sh new file mode 100644 index 0000000..a6b3bd1 --- /dev/null +++ b/.sandstorm/build.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -euo pipefail + +cd /opt/app +if [ ! -e go.mod ]; then + printf "Error: This directory does not contain a go module;\n" + printf "vagrant-spk's golang stack does not support older GOPATH\n" + printf "based projects. Try running:\n" >&2 + printf "\n" >&2 + printf " vagrant-spk vm ssh\n" >&2 + printf " cd /opt/app\n" >&2 + printf " go mod init example.com/mypkg\n" >&2 + exit 1 +fi +go build -o tube +exit 0 |
