From 4d8fb900c6c1b858da3928f8107ab72faa86a40e Mon Sep 17 00:00:00 2001 From: Andy Goldstein Date: Wed, 14 Mar 2018 14:35:09 -0400 Subject: [PATCH] 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 --- Gopkg.toml | 5 +++++ docs/vendoring-dependencies.md | 17 ++++++----------- hack/dep-save.sh | 21 --------------------- 3 files changed, 11 insertions(+), 32 deletions(-) delete mode 100755 hack/dep-save.sh diff --git a/Gopkg.toml b/Gopkg.toml index 4f7b92278..b095e6846 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -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" diff --git a/docs/vendoring-dependencies.md b/docs/vendoring-dependencies.md index ce5f9a9d4..1729f21ec 100644 --- a/docs/vendoring-dependencies.md +++ b/docs/vendoring-dependencies.md @@ -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 [ ...]` to update one or more dependencies. +Run `dep ensure -update [ ...]` to update one or more dependencies. [0]: https://github.com/golang/dep +[1]: https://golang.github.io/dep/docs/installation.html diff --git a/hack/dep-save.sh b/hack/dep-save.sh deleted file mode 100755 index 18efe2634..000000000 --- a/hack/dep-save.sh +++ /dev/null @@ -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 {} \;