diff --git a/Makefile b/Makefile index fabfcb03..76c1f4fb 100644 --- a/Makefile +++ b/Makefile @@ -48,14 +48,14 @@ proto_install: go install -v google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest snapshot: - go run ./cmd/internal/build goreleaser release --rm-dist --snapshot || exit 1 + go run ./cmd/internal/build goreleaser release --clean --snapshot || exit 1 mkdir dist/release mv dist/*.tar.gz dist/*.zip dist/*.deb dist/*.rpm dist/release ghr --delete --draft --prerelease -p 1 nightly dist/release rm -r dist release: - go run ./cmd/internal/build goreleaser release --rm-dist --skip-publish || exit 1 + go run ./cmd/internal/build goreleaser release --clean --skip-publish || exit 1 mkdir dist/release mv dist/*.tar.gz dist/*.zip dist/*.deb dist/*.rpm dist/release ghr --delete --draft --prerelease -p 3 $(shell git describe --tags) dist/release diff --git a/cmd/internal/build/main.go b/cmd/internal/build/main.go index 0bd11f98..c7a64bb8 100644 --- a/cmd/internal/build/main.go +++ b/cmd/internal/build/main.go @@ -1,6 +1,7 @@ package main import ( + "go/build" "os" "os/exec" @@ -11,6 +12,10 @@ import ( func main() { build_shared.FindSDK() + if os.Getenv("build.Default.GOPATH") == "" { + os.Setenv("GOPATH", build.Default.GOPATH) + } + command := exec.Command(os.Args[1], os.Args[2:]...) command.Stdout = os.Stdout command.Stderr = os.Stderr