mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +00:00
Merge pull request #1054 from filbranden/build_without_godep
Build without godep
This commit is contained in:
commit
8072f69a4c
@ -8,14 +8,13 @@ go:
|
|||||||
install:
|
install:
|
||||||
- go get code.google.com/p/go.tools/cmd/cover
|
- go get code.google.com/p/go.tools/cmd/cover
|
||||||
- go get github.com/coreos/etcd
|
- go get github.com/coreos/etcd
|
||||||
- go get github.com/tools/godep
|
|
||||||
- ./hack/verify-gofmt.sh
|
- ./hack/verify-gofmt.sh
|
||||||
- ./hack/verify-boilerplate.sh
|
- ./hack/verify-boilerplate.sh
|
||||||
- ./hack/install-std-race.sh
|
- ./hack/install-std-race.sh
|
||||||
- PATH=$HOME/gopath/bin:$PATH ./hack/build-go.sh
|
- ./hack/build-go.sh
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- PATH=$HOME/gopath/bin:$PATH ./hack/test-go.sh
|
- ./hack/test-go.sh
|
||||||
- PATH=$HOME/gopath/bin:$PATH ./hack/test-cmd.sh
|
- PATH=$HOME/gopath/bin:$PATH ./hack/test-cmd.sh
|
||||||
- PATH=$HOME/gopath/bin:$PATH ./hack/test-integration.sh
|
- PATH=$HOME/gopath/bin:$PATH ./hack/test-integration.sh
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ The commands above will not work if there are more than one directory in ``$GOPA
|
|||||||
|
|
||||||
### godep and dependency management
|
### godep and dependency management
|
||||||
|
|
||||||
Kubernetes uses [godep](https://github.com/tools/godep) to manage dependencies. Please make sure that ``godep`` is installed and in your ``$PATH``.
|
Kubernetes uses [godep](https://github.com/tools/godep) to manage dependencies. It is not required for building Kubernetes but it is required when managing dependencies under the Godeps/ tree. Please make sure that ``godep`` is installed and in your ``$PATH``.
|
||||||
|
|
||||||
#### Installing godep
|
#### Installing godep
|
||||||
There are many ways to build and host go binaries. Here is an easy way to get utilities like ```godep``` installed:
|
There are many ways to build and host go binaries. Here is an easy way to get utilities like ```godep``` installed:
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
4. You must have Go (version 1.2 or later) installed: [www.golang.org](http://www.golang.org).
|
4. You must have Go (version 1.2 or later) installed: [www.golang.org](http://www.golang.org).
|
||||||
5. You must have the [`gcloud` components](https://developers.google.com/cloud/sdk/) installed.
|
5. You must have the [`gcloud` components](https://developers.google.com/cloud/sdk/) installed.
|
||||||
6. Ensure that your `gcloud` components are up-to-date by running `gcloud components update`.
|
6. Ensure that your `gcloud` components are up-to-date by running `gcloud components update`.
|
||||||
7. Install godep. [Instructions here](https://github.com/GoogleCloudPlatform/kubernetes#installing-godep)
|
7. Install godep (optional, only required when modifying package dependencies). [Instructions here](https://github.com/GoogleCloudPlatform/kubernetes#installing-godep)
|
||||||
8. Get the Kubernetes source:
|
8. Get the Kubernetes source:
|
||||||
|
|
||||||
git clone https://github.com/GoogleCloudPlatform/kubernetes.git
|
git clone https://github.com/GoogleCloudPlatform/kubernetes.git
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
go get github.com/vmware/govmomi/govc
|
go get github.com/vmware/govmomi/govc
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Install godep. [Instructions here](https://github.com/GoogleCloudPlatform/kubernetes#installing-godep)
|
5. Install godep (optional, only required when modifying package dependencies). [Instructions here](https://github.com/GoogleCloudPlatform/kubernetes#installing-godep)
|
||||||
|
|
||||||
6. Get the Kubernetes source:
|
6. Get the Kubernetes source:
|
||||||
|
|
||||||
|
@ -56,9 +56,9 @@ kube::version_ldflags() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
# kube::setup_go_environment will check that `go` and `godep` commands are
|
# kube::setup_go_environment will check that the `go` commands is available in
|
||||||
# available in ${PATH}. If not running on Travis, it will also check that the Go
|
# ${PATH}. If not running on Travis, it will also check that the Go version is
|
||||||
# version is good enough for the Kubernetes build.
|
# good enough for the Kubernetes build.
|
||||||
#
|
#
|
||||||
# Also set ${GOPATH} and environment variables needed by Go.
|
# Also set ${GOPATH} and environment variables needed by Go.
|
||||||
kube::setup_go_environment() {
|
kube::setup_go_environment() {
|
||||||
@ -68,12 +68,6 @@ kube::setup_go_environment() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "$(which godep)" ]]; then
|
|
||||||
echo "Can't find 'godep' in PATH, please fix and retry." >&2
|
|
||||||
echo "See https://github.com/GoogleCloudPlatform/kubernetes#godep-and-dependency-management" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Travis continuous build uses a head go release that doesn't report
|
# Travis continuous build uses a head go release that doesn't report
|
||||||
# a version number, so we skip this check on Travis. Its unnecessary
|
# a version number, so we skip this check on Travis. Its unnecessary
|
||||||
# there anyway.
|
# there anyway.
|
||||||
@ -88,8 +82,8 @@ kube::setup_go_environment() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TODO: get rid of this after PR #1054 gets rid of godep.
|
# Set GOPATH to point to the tree maintained by `godep`.
|
||||||
GOPATH="${KUBE_TARGET}:$(godep path)"
|
GOPATH="${KUBE_TARGET}:${KUBE_REPO_ROOT}/Godeps/_workspace"
|
||||||
export GOPATH
|
export GOPATH
|
||||||
|
|
||||||
# Unset GOBIN in case it already exsits in the current session.
|
# Unset GOBIN in case it already exsits in the current session.
|
||||||
|
Loading…
Reference in New Issue
Block a user