From 33f077ce1b9c8757c0570df4ff37a1a4364cf1ae Mon Sep 17 00:00:00 2001 From: Tomofumi Hayashi Date: Fri, 14 Jun 2019 15:36:44 +0900 Subject: [PATCH] Change .goreleaser.yml to support go module build --- .goreleaser.yml | 5 +++++ build | 2 +- test.sh | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 405f65d13..19d8b9635 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,5 +1,10 @@ # This is an example goreleaser.yaml file with some sane defaults. # Make sure to check the documentation at http://goreleaser.com +env: + - GO111MODULE=on +before: + hooks: + - go mod download builds: - env: diff --git a/build b/build index d2ca5f451..7c6a1bca3 100755 --- a/build +++ b/build @@ -23,7 +23,7 @@ LDFLAGS="-X main.version=${VERSION:-master} -X main.commit=${COMMIT} -X main.dat export CGO_ENABLED=0 # this if... will be removed when gomodules goes default -if [ $GO111MODULE == "off" ]; then +if [ "$GO111MODULE" == "off" ]; then echo "Building plugin without go module" echo "Warning: this will be deprecated in near future so please use go modules!" diff --git a/test.sh b/test.sh index bb1177b97..bd6df8148 100755 --- a/test.sh +++ b/test.sh @@ -2,7 +2,7 @@ set -e # this if... will be removed when gomodules goes default -if [ $GO111MODULE == "off" ]; then +if [ "$GO111MODULE" == "off" ]; then echo "Warning: this will be deprecated in near future so please use go modules!" ORG_PATH="github.com/intel"