diff --git a/Gopkg.toml b/Gopkg.toml index 08cbe2e811f..e6fa9a29e64 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -9,8 +9,6 @@ required = [ "k8s.io/code-generator/cmd/client-gen", "k8s.io/code-generator/cmd/lister-gen", "k8s.io/code-generator/cmd/informer-gen", - "github.com/google/go-containerregistry/cmd/ko", - "github.com/mattmoor/dep-collector", ] [prune] diff --git a/hack/update-deps.sh b/hack/update-deps.sh index 13877030869..be2a86774c9 100755 --- a/hack/update-deps.sh +++ b/hack/update-deps.sh @@ -14,14 +14,17 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Load github.com/knative/test-infra/images/prow-tests/scripts/library.sh +[ -f /workspace/library.sh ] \ + && source /workspace/library.sh \ + || eval "$(docker run --entrypoint sh gcr.io/knative-tests/test-infra/prow-tests -c 'cat library.sh')" +[ -v KNATIVE_TEST_INFRA ] || exit 1 + set -o errexit set -o nounset set -o pipefail -SCRIPT_ROOT=$(dirname ${BASH_SOURCE})/.. - -pushd ${SCRIPT_ROOT} -trap popd EXIT +cd ${REPO_ROOT_DIR} # Ensure we have everything we need under vendor/ dep ensure @@ -29,5 +32,4 @@ dep ensure rm -rf $(find vendor/ -name 'BUILD') rm -rf $(find vendor/ -name 'BUILD.bazel') -# Run dep-collector to update our VENDOR-LICENSE -go run ./vendor/github.com/mattmoor/dep-collector/*.go ./cmd/* > third_party/VENDOR-LICENSE +update_licenses third_party/VENDOR-LICENSE "./cmd/*" diff --git a/test/presubmit-tests.sh b/test/presubmit-tests.sh index 857f883d214..d562d9a26ca 100755 --- a/test/presubmit-tests.sh +++ b/test/presubmit-tests.sh @@ -44,7 +44,7 @@ function build_tests() { # Fetch the google/licenseclassifier for its license db go get github.com/google/licenseclassifier || return 1 # Check that we don't have any forbidden licenses in our images. - go run ./vendor/github.com/mattmoor/dep-collector/*.go -check ./cmd/* || result=1 + dep-collector -check ./cmd/* || result=1 return ${result} }