feat: updates build scripts

Build scripts now invoke `go mod vendor` and `go mod tidy` early in the
build process, to ensure that the `vendor` directory stays consistent
with the `go.mod` et. al.
This commit is contained in:
Chris Lane 2019-11-12 18:59:37 -05:00
parent 4dda412dcb
commit 27a4991a3a
2 changed files with 6 additions and 0 deletions

View File

@ -4,6 +4,9 @@
BINDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" BINDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
APPDIR=$(readlink -f "$BINDIR/..") APPDIR=$(readlink -f "$BINDIR/..")
# update the vendored dependencies
go mod vendor && go mod tidy
# compile the executable # compile the executable
cd "$APPDIR/cmd/cheat" cd "$APPDIR/cmd/cheat"
go clean && go generate && go build -mod vendor go clean && go generate && go build -mod vendor

View File

@ -4,6 +4,9 @@
BINDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" BINDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
APPDIR=$(readlink -f "$BINDIR/..") APPDIR=$(readlink -f "$BINDIR/..")
# update the vendored dependencies
go mod vendor && go mod tidy
# build embeds # build embeds
cd "$APPDIR/cmd/cheat" cd "$APPDIR/cmd/cheat"
go clean && go generate go clean && go generate