summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2021-07-05 20:19:43 +0200
committerkali kaneko (leap communications) <kali@leap.se>2021-07-06 18:59:21 +0200
commit817183168aea901f72671576e0859b62f8d63164 (patch)
tree9ad75dde4dbeb572337e05d53f0005fef2aeff26
parent483636cb7a67db634e080e8081156c1203279a27 (diff)
[pkg] force mod vendor, but fail gracefully
-rwxr-xr-xgui/build.sh5
-rw-r--r--pkg/config/version/genver/gen.go2
2 files changed, 4 insertions, 3 deletions
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
diff --git a/pkg/config/version/genver/gen.go b/pkg/config/version/genver/gen.go
index e453824..e2fb3b8 100644
--- a/pkg/config/version/genver/gen.go
+++ b/pkg/config/version/genver/gen.go
@@ -1,3 +1,3 @@
package main
-//go:generate go run . -output ../version.go
+//go:generate go run . -output=../version.go