minio/DEVELOPERS.md

60 lines
2.5 KiB
Markdown
Raw Normal View History

2014-11-30 22:55:10 +01:00
### Build Dependencies
2014-12-04 10:18:26 +01:00
This installation document assumes Ubuntu 12.04 or later on x86-64.
2014-11-30 22:55:10 +01:00
2014-12-04 10:56:01 +01:00
##### Install Git and GCC
```sh
$ sudo apt-get install git build-essential
```
##### Install Mercurial
```sh
$ sudo apt-get install mercurial
```
2014-12-04 10:18:26 +01:00
##### Install YASM
2014-11-30 22:55:10 +01:00
```sh
$ sudo apt-get install yasm
```
2014-12-04 10:18:26 +01:00
##### Install Go 1.3+
Download Go 1.3+ from [https://golang.org/dl/](https://golang.org/dl/) and extract it into ``${HOME}/local`` and setup ``${HOME}/mygo`` as your project workspace folder.
For example:
2014-11-30 22:55:10 +01:00
```sh
2014-12-04 10:18:26 +01:00
$ wget https://storage.googleapis.com/golang/go1.3.3.linux-amd64.tar.gz
$ mkdir -p ${HOME}/local
2014-12-04 10:18:26 +01:00
$ tar -C ${HOME}/local -xzf go1.3.3.linux-amd64.tar.gz
$ export PATH=$PATH:${HOME}/local/go/bin
$ mkdir -p $HOME/mygo
2014-11-30 22:55:10 +01:00
$ export GOPATH=$HOME/mygo
$ export PATH=$PATH:$GOPATH/bin
```
2014-12-04 10:18:26 +01:00
### Setup your Minio Github Repository &nbsp; &nbsp; <iframe src="http://ghbtns.com/github-btn.html?user=Minio-io&repo=minio&type=fork&count=true&size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe>
2014-12-04 10:56:01 +01:00
Fork [Minio upstream](https://github.com/Minio-io/minio) source repository to your own personal repository. Copy the URL and pass it to ``go get`` command. Go uses git to clone a copy into your project workspace folder.
2014-11-30 22:55:10 +01:00
```sh
2014-12-04 10:18:26 +01:00
$ go get -u github.com/$USER_ID/minio
$ cd $GOPATH/src/github.com/$USER_ID/minio/
$ git remote add upstream https://github.com/Minio-io/minio.git
2014-11-30 22:55:10 +01:00
```
2014-12-04 10:18:26 +01:00
### Compiling Minio from source
Minio use plain Makefile to wrap around some of the limitations of ``go build``. To compile Minio source, simply change to your workspace folder and type ``make``.
2014-11-30 22:55:10 +01:00
```sh
2014-12-04 10:18:26 +01:00
$ cd $GOPATH/src/github.com/$USER_ID/minio/
2014-11-30 22:55:10 +01:00
$ make
2014-12-04 10:18:26 +01:00
...
2014-11-30 22:55:10 +01:00
```
### Contribution Guidelines
We welcome your contributions. To make the process as seamless as possible, we ask for the following:
* Go ahead and fork the project and make your changes. We encourage pull requests to discuss code changes.
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request
* When you're ready to create a pull request, be sure to:
- Have test cases for the new code. If you have questions about how to do it, please ask in your pull request.
- Run go fmt
- Squash your commits into a single commit. git rebase -i. It's okay to force update your pull request.
2014-12-04 10:18:26 +01:00
- Make sure go test ./... passes, and go build completes.