Update dep info

- Add pruning settings to Gopkg.toml
- Update vendoring deps doc to point to dep installation instructions
  and to use dep instead of hack/dep-save.sh
- Remove hack/dep-save.sh

Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
This commit is contained in:
Andy Goldstein
2018-03-14 14:35:09 -04:00
parent d1293825ef
commit 4d8fb900c6
3 changed files with 11 additions and 32 deletions

View File

@@ -31,6 +31,11 @@ required = [
"k8s.io/code-generator/cmd/informer-gen",
]
[prune]
unused-packages = true
non-go = true
go-tests = true
[[constraint]]
name = "cloud.google.com/go"
version = "0.11.0"

View File

@@ -2,22 +2,17 @@
## Overview
We are using [dep][0] to manage dependencies. You can install it by running
```
go get -u github.com/golang/dep/cmd/dep
```
Dep currently pulls in a bit more than we'd like, so
we have created a script to remove these extra files: `hack/dep-save.sh`.
We are using [dep][0] to manage dependencies. You can install it by following [these
instructions][1].
## Adding a new dependency
Run `hack/dep-save.sh`. If you want to see verbose output, you can append `-v` as in
`hack/dep-save.sh -v`.
Run `dep ensure`. If you want to see verbose output, you can append `-v` as in
`dep ensure -v`.
## Updating an existing dependency
Run `hack/dep-save.sh -update <pkg> [<pkg> ...]` to update one or more dependencies.
Run `dep ensure -update <pkg> [<pkg> ...]` to update one or more dependencies.
[0]: https://github.com/golang/dep
[1]: https://golang.github.io/dep/docs/installation.html

View File

@@ -1,21 +0,0 @@
#!/bin/bash -e
#
# Copyright 2017 the Heptio Ark contributors.
#
# 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.
dep ensure $@
dep prune
# remove files we don't want
find vendor \( -name BUILD -o -name .travis.yml -o -name '*_test.go' \) -exec rm {} \;