cheat/bin/build_release.sh
Chris Lane a13ad99241 chore: modified build scripts
Modified build scripts to always use local vendoring, now that the
project contains a `vendor` directory.
2019-10-28 19:39:22 -04:00

20 lines
588 B
Bash
Executable File

#!/bin/bash
# locate the cheat project root
BINDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
APPDIR=$(readlink -f "$BINDIR/..")
# build embeds
cd "$APPDIR/cmd/cheat"
go clean && go generate
# compile AMD64 for Linux, OSX, and Windows
env GOOS=darwin GOARCH=amd64 go build -mod vendor -o \
"$APPDIR/dist/cheat-darwin-amd64" "$APPDIR/cmd/cheat"
env GOOS=linux GOARCH=amd64 go build -mod vendor -o \
"$APPDIR/dist/cheat-linux-amd64" "$APPDIR/cmd/cheat"
env GOOS=windows GOARCH=amd64 go build -mod vendor -o \
"$APPDIR/dist/cheat-win-amd64.exe" "$APPDIR/cmd/cheat"