From 817183168aea901f72671576e0859b62f8d63164 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Mon, 5 Jul 2021 20:19:43 +0200 Subject: [pkg] force mod vendor, but fail gracefully --- gui/build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gui/build.sh') diff --git a/gui/build.sh b/gui/build.sh index 56e3d66..9dd84dd 100755 --- a/gui/build.sh +++ b/gui/build.sh @@ -51,7 +51,8 @@ function init { function buildGoLib { echo "[+] Using go in" $GO "[`go version`]" - $GO generate ./pkg/config/version/genver/gen.go + $GO generate -mod=vendor ./pkg/config/version/genver/gen.go || echo "[!] Error on go generate" + if [ "$PLATFORM" == "Darwin" ] then GOOS=darwin @@ -63,7 +64,7 @@ function buildGoLib { if [ "$XBUILD" == "no" ] then echo "[+] Building Go library with standard Go compiler" - CGO_ENABLED=1 GOOS=$GOOS CC=$CC CGO_CFLAGS=$CGO_CFLAGS CGO_LDFLAGS=$CGO_LDFLAGS go build -buildmode=c-archive -o $TARGET_GOLIB $SOURCE_GOLIB + CGO_ENABLED=1 GOOS=$GOOS CC=$CC CGO_CFLAGS=$CGO_CFLAGS CGO_LDFLAGS=$CGO_LDFLAGS go build -mod=vendor -buildmode=c-archive -o $TARGET_GOLIB $SOURCE_GOLIB fi if [ "$XBUILD" == "$WIN64" ] then -- cgit v1.2.3