You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.7 KiB

  1. ### Install Golang
  2. If you do not have a working Golang environment setup please follow [Golang Installation Guide](https://docs.minio.io/docs/how-to-install-golang).
  3. ### Setup your Minio Github Repository
  4. Fork [Minio upstream](https://github.com/minio/minio/fork) source repository to your own personal repository. Copy the URL for minio from your personal github repo (you will need it for the `git clone` command below).
  5. ```sh
  6. $ mkdir -p $GOPATH/src/github.com/minio
  7. $ cd $GOPATH/src/github.com/minio
  8. $ git clone <paste saved URL for personal forked minio repo>
  9. $ cd minio
  10. ```
  11. ### Compiling Minio from source
  12. Minio uses ``Makefile`` to wrap around some of redundant checks done through command line.
  13. ```sh
  14. $ make
  15. Checking if proper environment variables are set.. Done
  16. ...
  17. Checking dependencies for Minio.. Done
  18. Installed govet
  19. Building Libraries
  20. ...
  21. ...
  22. ```
  23. ### Setting up git remote as ``upstream``
  24. ```sh
  25. $ cd $GOPATH/src/github.com/minio/minio
  26. $ git remote add upstream https://github.com/minio/minio
  27. $ git fetch upstream
  28. $ git merge upstream/master
  29. ...
  30. ...
  31. $ make
  32. Checking if proper environment variables are set.. Done
  33. ...
  34. Checking dependencies for Minio.. Done
  35. Installed govet
  36. Building Libraries
  37. ...
  38. ```
  39. ### Developer Guidelines
  40. ``Minio`` community welcomes your contribution. To make the process as seamless as possible, we ask for the following:
  41. * Go ahead and fork the project and make your changes. We encourage pull requests to discuss code changes.
  42. - Fork it
  43. - Create your feature branch (git checkout -b my-new-feature)
  44. - Commit your changes (git commit -am 'Add some feature')
  45. - Push to the branch (git push origin my-new-feature)
  46. - Create new Pull Request
  47. * If you have additional dependencies for ``Minio``, ``Minio`` manages its dependencies using [govendor](https://github.com/kardianos/govendor)
  48. - Run `go get foo/bar`
  49. - Edit your code to import foo/bar
  50. - Run `make pkg-add PKG=foo/bar` from top-level directory
  51. * If you have dependencies for ``Minio`` which needs to be removed
  52. - Edit your code to not import foo/bar
  53. - Run `make pkg-remove PKG=foo/bar` from top-level directory
  54. * When you're ready to create a pull request, be sure to:
  55. - Have test cases for the new code. If you have questions about how to do it, please ask in your pull request.
  56. - Run `make verifiers`
  57. - Squash your commits into a single commit. `git rebase -i`. It's okay to force update your pull request.
  58. - Make sure `go test -race ./...` and `go build` completes.
  59. * Read [Effective Go](https://github.com/golang/go/wiki/CodeReviewComments) article from Golang project
  60. - `Minio` project is fully conformant with Golang style
  61. - if you happen to observe offending code, please feel free to send a pull request