Remove run-in-gopath.sh
This commit is contained in:
		| @@ -561,9 +561,6 @@ EOF | ||||
| kube::golang::old::setup_env() { | ||||
|   kube::golang::verify_go_version | ||||
|  | ||||
|   # Set up GOPATH.  We have tools which depend on being in a GOPATH (see | ||||
|   # hack/run-in-gopath.sh). | ||||
|   # | ||||
|   # Even in module mode, we need to set GOPATH for `go build` and `go install` | ||||
|   # to work.  We build various tools (usually via `go install`) from a lot of | ||||
|   # scripts. | ||||
| @@ -577,9 +574,6 @@ kube::golang::old::setup_env() { | ||||
|   # Instead we set it to a phony local path and process the results ourselves. | ||||
|   # In particular, GOPATH[0]/bin will be used for `go install`, with | ||||
|   # cross-compiles adding an extra directory under that. | ||||
|   # | ||||
|   # Eventually, when we no longer rely on run-in-gopath.sh we may be able to | ||||
|   # simplify this some. | ||||
|   local go_pkg_dir="${KUBE_GOPATH}/src/${KUBE_GO_PACKAGE}" | ||||
|   local go_pkg_basedir | ||||
|   go_pkg_basedir=$(dirname "${go_pkg_dir}") | ||||
| @@ -634,9 +628,6 @@ kube::golang::old::setup_env() { | ||||
| kube::golang::new::setup_env() { | ||||
|   kube::golang::verify_go_version | ||||
|  | ||||
|   # Set up GOPATH.  We have tools which depend on being in a GOPATH (see | ||||
|   # hack/run-in-gopath.sh). | ||||
|   # | ||||
|   # Even in module mode, we need to set GOPATH for `go build` and `go install` | ||||
|   # to work.  We build various tools (usually via `go install`) from a lot of | ||||
|   # scripts. | ||||
| @@ -650,9 +641,6 @@ kube::golang::new::setup_env() { | ||||
|   # Instead we set it to a phony local path and process the results ourselves. | ||||
|   # In particular, GOPATH[0]/bin will be used for `go install`, with | ||||
|   # cross-compiles adding an extra directory under that. | ||||
|   # | ||||
|   # Eventually, when we no longer rely on run-in-gopath.sh we may be able to | ||||
|   # simplify this some. | ||||
|   export GOPATH="${KUBE_GOPATH}" | ||||
|  | ||||
|   # If these are not set, set them now.  This ensures that any subsequent | ||||
|   | ||||
| @@ -1,34 +0,0 @@ | ||||
| #!/usr/bin/env bash | ||||
|  | ||||
| # Copyright 2016 The Kubernetes Authors. | ||||
| # | ||||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| # you may not use this file except in compliance with the License. | ||||
| # You may obtain a copy of the License at | ||||
| # | ||||
| #     http://www.apache.org/licenses/LICENSE-2.0 | ||||
| # | ||||
| # Unless required by applicable law or agreed to in writing, software | ||||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
| # See the License for the specific language governing permissions and | ||||
| # limitations under the License. | ||||
|  | ||||
| # This script sets up a temporary Kubernetes GOPATH and runs an arbitrary | ||||
| # command under it. Go tooling requires that the current directory be under | ||||
| # GOPATH or else it fails to find some things, such as the vendor directory for | ||||
| # the project. | ||||
| # Usage: `hack/run-in-gopath.sh <command>`. | ||||
|  | ||||
| set -o errexit | ||||
| set -o nounset | ||||
| set -o pipefail | ||||
|  | ||||
| KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. | ||||
| source "${KUBE_ROOT}/hack/lib/init.sh" | ||||
|  | ||||
| # This sets up a clean GOPATH and makes sure we are currently in it. | ||||
| kube::golang::old::setup_env | ||||
|  | ||||
| # Run the user-provided command. | ||||
| "${@}" | ||||
		Reference in New Issue
	
	Block a user
	 Tim Hockin
					Tim Hockin