build: remove env.sh (#20541)

* build: remove env.sh

This removes the dirty symlink-to-self hack we've had for years. The
script was added to enable building without GOPATH and did that job
reliably for all this time. We can remove the workaround because modern
Go supports building without GOPATH natively.

* Makefile: add GO111MODULE=on to environment
This commit is contained in:
Felix Lange
2020-01-14 13:13:14 +01:00
committed by Péter Szilágyi
parent 8592a57553
commit feda78e052
5 changed files with 25 additions and 73 deletions

View File

@ -51,15 +51,6 @@ func MustRunCommand(cmd string, args ...string) {
MustRun(exec.Command(cmd, args...))
}
// GOPATH returns the value that the GOPATH environment
// variable should be set to.
func GOPATH() string {
if os.Getenv("GOPATH") == "" {
log.Fatal("GOPATH is not set")
}
return os.Getenv("GOPATH")
}
var warnedAboutGit bool
// RunGit runs a git subcommand and returns its output.