Skip to content

Commit

Permalink
add GO111MODULE=on
Browse files Browse the repository at this point in the history
  • Loading branch information
fafg committed May 3, 2020
1 parent e4f34e1 commit 543a232
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ if [[ "$targetos" == *"Windows_NT"* ]];
then
set GOARCH="$targetarch"
set GOOS="$targetos"
set GO111MODULE=on
extension=".exe"
go build -ldflags "-s -w" -o "$name-windows""$targetarch"-"$version""$extension" main.go
mv "$name-windows""$targetarch"-"$version""$extension" ../
Expand All @@ -25,10 +26,10 @@ else
if [[ "$targetos" == *"MacOSX"* ]];
then
echo "$PWD"
env GOOS="darwin" GOARCH="$targetarch" go build -ldflags "-s -w" -o "$name-darwin-""$targetarch"-"$version" main.go
env GO111MODULE=on GOOS="darwin" GOARCH="$targetarch" go build -ldflags "-s -w" -o "$name-darwin-""$targetarch"-"$version" main.go
mv "$name-darwin-""$targetarch"-"$version" ../
else
env GOOS="linux" GOARCH="$targetarch" go build -ldflags "-s -w" -o "$name-linux-""$targetarch"-"$version" main.go
env GO111MODULE=on GOOS="linux" GOARCH="$targetarch" go build -ldflags "-s -w" -o "$name-linux-""$targetarch"-"$version" main.go
mv "$name-linux-""$targetarch"-"$version" ../
fi
fi
fi

0 comments on commit 543a232

Please sign in to comment.