Skip to content
This repository was archived by the owner on Apr 17, 2019. It is now read-only.

Commit 413b7dc

Browse files
authored
Merge pull request #1247 from bprashanth/godep
Update Ingress godep
2 parents ee845b5 + c314072 commit 413b7dc

File tree

485 files changed

+94068
-26870
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

485 files changed

+94068
-26870
lines changed

README.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ that aren't part of the Kubernetes core.
99

1010
The code must be checked out as a subdirectory of `k8s.io`, and not `github.com`.
1111

12-
```sh
12+
```shell
1313
mkdir -p $GOPATH/src/k8s.io
1414
cd $GOPATH/src/k8s.io
1515
# Replace "$YOUR_GITHUB_USERNAME" below with your github username
@@ -24,14 +24,38 @@ contrib contains multiple tiny projects, each with their own dependencies. Each
2424
in contrib/ has it's own Godeps.json. For example the Godeps.json for Ingress
2525
is Ingress/Godeps/Godeps.json. This means that godeps commands like `godep restore`
2626
or `godep test` work in the root directory. Theys should be run from inside the
27-
subproject directory you want to test
27+
subproject directory you want to test.
28+
29+
## Prerequisites for updating Godeps
30+
31+
Since we vendor godeps through `/vendor` vs the old style `Godeps/_workspace`, you either need a more recent install of go and godeps, or you need to set `GO15VENDOREXPERIMENT=1`. Eg:
32+
```shell
33+
$ godep version
34+
godep v74 (linux/amd64/go1.6.1)
35+
$ go version
36+
go version go1.6.1 linux/amd64
37+
$ godep save ./...
38+
```
39+
40+
Will automatically save godeps to `vendor/` instead of `_workspace/`.
41+
If you have an older version of go, you must run:
42+
```shell
43+
$ GO15VENDOREXPERIMENT=1 godep save ./...
44+
```
45+
46+
If you have an older version of godep, you must update it:
47+
```shell
48+
$ go get github.com/tools/godep
49+
$ cd $GOPATH/src/github.com/tools/godep
50+
$ go build -o godep *.go
51+
```
2852

2953
## Updating Godeps
3054

3155
The most common dep to update is obviously going to be kuberetes proper. Updating
3256
kubernetes and it's dependancies in the Ingress subproject for example can be done
33-
as follows:
34-
```
57+
as follows (the example assumes you Kubernetes repo is rooted at `$GOPATH/src/github.com/kubernetes`, `s/github.com\/kubernetes/k8s.io/` as required):
58+
```shell
3559
cd $GOPATH/src/github.com/kubernetes/contrib/ingress
3660
godep restore
3761
go get -u github.com/kubernetes/kubernetes
@@ -46,7 +70,7 @@ git commit
4670

4771
Other deps are similar, although if the dep you wish to update is included from
4872
kubernetes we probably want to stay in sync using the above method. If the dep is not in kubernetes proper something like the following should get you a nice clean result:
49-
```
73+
```shell
5074
cd $GOPATH/src/github/kubernetes/contrib/ingress
5175
godep restore
5276
go get -u $SOME_DEP
@@ -59,6 +83,6 @@ git commit
5983
## Running all tests
6084

6185
To run all go test in all projects do this:
62-
```
86+
```shell
6387
./hack/for-go-proj.sh test
6488
```

0 commit comments

Comments
 (0)