diff --git a/Makefile b/Makefile index 0872e065..c526e904 100644 --- a/Makefile +++ b/Makefile @@ -135,3 +135,6 @@ validate-local: test-unit-local: $(GPGME_ENV) $(GO) test -tags "$(BUILDTAGS)" $$($(GO) list -tags "$(BUILDTAGS)" -e ./... | grep -v '^github\.com/projectatomic/skopeo/\(integration\|vendor/.*\)$$') + +vendor: vendor.conf + vndr -whitelist '^github.com/containers/image/docs/.*' diff --git a/README.md b/README.md index 06f0b7f9..33664f6a 100644 --- a/README.md +++ b/README.md @@ -224,30 +224,30 @@ CONTRIBUTING ### Dependencies management -`skopeo` uses [`vndr`](https://github.com/LK4D4/vndr) for dependencies management. +Make sure [`vndr`](https://github.com/LK4D4/vndr) is installed. In order to add a new dependency to this project: - add a new line to `vendor.conf` according to `vndr` rules (e.g. `github.com/pkg/errors master`) -- run `vndr github.com/pkg/errors` +- run `make vendor` In order to update an existing dependency: - update the relevant dependency line in `vendor.conf` -- run `vndr github.com/pkg/errors` +- run `make vendor` When new PRs for [containers/image](https://github.com/containers/image) break `skopeo` (i.e. `containers/image` tests fail in `make test-skopeo`): - create out a new branch in your `skopeo` checkout and switch to it - update `vendor.conf`. Find out the `containers/image` dependency; update it to vendor from your own branch and your own repository fork (e.g. `github.com/containers/image my-branch https://github.com/runcom/image`) -- run `vndr github.com/containers/image` +- run `make vendor` - make any other necessary changes in the skopeo repo (e.g. add other dependencies now requied by `containers/image`, or update skopeo for changed `containers/image` API) - optionally add new integration tests to the skopeo repo - submit the resulting branch as a skopeo PR, marked “DO NOT MERGE” - iterate until tests pass and the PR is reviewed - then the original `containers/image` PR can be merged, disregarding its `make test-skopeo` failure - as soon as possible after that, in the skopeo PR, restore the `containers/image` line in `vendor.conf` to use `containers/image:master` -- run `vndr github.com/containers/image` +- run `make vendor` - update the skopeo PR with the result, drop the “DO NOT MERGE” marking - after tests complete succcesfully again, merge the skopeo PR diff --git a/hack/vendor.sh b/hack/vendor.sh deleted file mode 100644 index 9a4d0385..00000000 --- a/hack/vendor.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -# This file is just wrapper around vndr (github.com/LK4D4/vndr) tool. -# For updating dependencies you should change `vendor.conf` file in root of the -# project. Please refer to https://github.com/LK4D4/vndr/blob/master/README.md for -# vndr usage. - -set -e - -if ! hash vndr; then - echo "Please install vndr with \"go get github.com/LK4D4/vndr\" and put it in your \$GOPATH" - exit 1 -fi - -vndr "$@"