From 27a4991a3adec347579890024ee8353f83c50ca8 Mon Sep 17 00:00:00 2001 From: Chris Lane Date: Tue, 12 Nov 2019 18:59:37 -0500 Subject: [PATCH] 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. --- bin/build_devel.sh | 3 +++ bin/build_release.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/bin/build_devel.sh b/bin/build_devel.sh index 7a9ab32..6cb58f7 100755 --- a/bin/build_devel.sh +++ b/bin/build_devel.sh @@ -4,6 +4,9 @@ BINDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" APPDIR=$(readlink -f "$BINDIR/..") +# update the vendored dependencies +go mod vendor && go mod tidy + # compile the executable cd "$APPDIR/cmd/cheat" go clean && go generate && go build -mod vendor diff --git a/bin/build_release.sh b/bin/build_release.sh index f4b2208..21d899e 100755 --- a/bin/build_release.sh +++ b/bin/build_release.sh @@ -4,6 +4,9 @@ BINDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" APPDIR=$(readlink -f "$BINDIR/..") +# update the vendored dependencies +go mod vendor && go mod tidy + # build embeds cd "$APPDIR/cmd/cheat" go clean && go generate