We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow.
If you haven't written Go code on your machine before, first follow the official Golang instructions for setting up your environment: https://golang.org/doc/code.html
Once you have your environment set up, create a fork of the container-diff repository
with your personal GitHub account. Then, clone the fork into your $GOPATH
:
git clone git@github.com:<your_account>/container-diff.git
$GOPATH/src/github.com/GoogleContainerTools/container-diff &&
cd $GOPATH/src/github.com/GoogleContainerTools/container-diff &&
git remote add upstream git@github.com:GoogleContainerTools/container-diff.git
The last command here sets the official repository as an upstream repository for
your fork, so you can keep your fork in sync with MASTER
:
(container-diff) git pull upstream master && git push origin master
From the project root, run make clean && make
.
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult GitHub Help for more information on using pull requests.
Contributions to this project must be accompanied by a Contributor License Agreement. You (or your employer) retain the copyright to your contribution, this simply gives us permission to use and redistribute your contributions as part of the project. Head over to https://cla.developers.google.com/ to see your current agreements on file or to sign a new one.
You generally only need to submit a CLA once, so if you've already submitted one (even if it was for a different project), you probably don't need to do it again.
Before sending a PR, please make sure the included tests pass. You can run these by running
make test integration
from the project root.
You can also configure the included git hook to run tests automatically on commit. To do so, run:
ln -s $(pwd)/hack/hooks/* .git/hooks
from the project root.
This project uses dep for managing dependencies and the vendor
directory.
You should not need to know about this tool unless you are trying to add a new dependency or update an existing one.
See the dep documentation for information on how to add a dependency.