summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Robinson <arob@google.com>2015-02-18 22:04:56 +0000
committerAlex Robinson <arob@google.com>2015-02-18 22:16:12 +0000
commitd20061eeff1b9cfa0774b9259143ca7f7c859791 (patch)
tree63b687c7be30737eb28a0c0e9544e0d814e8e662
parent3cb657fac08b3c302cb244066c69e73469ccafd1 (diff)
Combine the two documentation sections on how to use godeps.
-rw-r--r--development.md32
1 files changed, 7 insertions, 25 deletions
diff --git a/development.md b/development.md
index 302f4af8..67ef5916 100644
--- a/development.md
+++ b/development.md
@@ -49,7 +49,7 @@ export PATH=$PATH:$GOPATH/bin
```
### Using godep
-Here is a quick summary of `godep`. `godep` helps manage third party dependencies by copying known versions into Godeps/_workspace. Here is the recommended way to set up your system. There are other ways that may work, but this is the easiest one I know of.
+Here's a quick walkthrough of one way to use godeps to add or update a Kubernetes dependency into Godeps/_workspace. For more details, please see the instructions in [godep's documentation](https://github.com/tools/godep).
1) Devote a directory to this endeavor:
```
@@ -69,7 +69,7 @@ export GOPATH=$KPATH
# Option B is recommended if you're going to mess with the dependencies.
```
-3) Populate your new $GOPATH.
+3) Populate your new GOPATH.
```
cd $KPATH/src/github.com/GoogleCloudPlatform/kubernetes
godep restore
@@ -77,20 +77,22 @@ godep restore
4) Next, you can either add a new dependency or update an existing one.
```
-# To add a new dependency, run:
+# To add a new dependency, do:
cd $KPATH/src/github.com/GoogleCloudPlatform/kubernetes
go get path/to/dependency
+# Change code in Kubernetes to use the dependency.
godep save ./...
-# To update an existing dependency, do
+# To update an existing dependency, do:
cd $KPATH/src/github.com/GoogleCloudPlatform/kubernetes
go get -u path/to/dependency
+# Change code in Kubernetes accordingly if necessary.
godep update path/to/dependency
```
5) Before sending your PR, it's a good idea to sanity check that your Godeps.json file is ok by re-restoring: ```godep restore```
-I (lavalamp) have sometimes found it expedient to manually fix the /Godeps/godeps.json file to minimize the changes.
+It is sometimes expedient to manually fix the /Godeps/godeps.json file to minimize the changes.
Please send dependency updates in separate commits within your PR, for easier reviewing.
@@ -208,26 +210,6 @@ go run e2e.go -ctl='delete pod foobar'
## Testing out flaky tests
[Instructions here](flaky-tests.md)
-## Add/Update dependencies
-
-Kubernetes uses [godep](https://github.com/tools/godep) to manage dependencies. To add or update a package, please follow the instructions on [godep's document](https://github.com/tools/godep).
-
-To add a new package ``foo/bar``:
-
-- Make sure the kubernetes' root directory is in $GOPATH/github.com/GoogleCloudPlatform/kubernetes
-- Run ``godep restore`` to make sure you have all dependancies pulled.
-- Download foo/bar into the first directory in GOPATH: ``go get foo/bar``.
-- Change code in kubernetes to use ``foo/bar``.
-- Run ``godep save ./...`` under kubernetes' root directory.
-
-To update a package ``foo/bar``:
-
-- Make sure the kubernetes' root directory is in $GOPATH/github.com/GoogleCloudPlatform/kubernetes
-- Run ``godep restore`` to make sure you have all dependancies pulled.
-- Update the package with ``go get -u foo/bar``.
-- Change code in kubernetes accordingly if necessary.
-- Run ``godep update foo/bar`` under kubernetes' root directory.
-
## Keeping your development fork in sync
One time after cloning your forked repo: