不要怂,就是干,撸起袖子干!

Commit dc9741ef by Sushant Committed by Mick Hansen

Update CONTRIBUTING.md (#6211)

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md
1 parent 5ba4565c
Showing with 12 additions and 48 deletions
_Please note!_ The github issue tracker should only be used for feature requests and bugs with a clear description of the issue and the expected behaviour (see below). All questions belong on [StackOverflow](https://stackoverflow.com/questions/tagged/sequelize.js) or [Google groups](https://groups.google.com/forum/#!forum/sequelize). _Please note!_ The github issue tracker should only be used for feature requests and bugs with a clear description of the issue and the expected behaviour (see below). All questions belong on [Slack](https://sequelize.slack.com), [StackOverflow](https://stackoverflow.com/questions/tagged/sequelize.js) or [Google groups](https://groups.google.com/forum/#!forum/sequelize).
# Issues # Issues
Issues are always very welcome - after all, they are a big part of making sequelize better. However, there are a couple of things you can do to make the lives of the developers _much, much_ easier: Issues are always very welcome - after all, they are a big part of making sequelize better. However, there are a couple of things you can do to make the lives of the developers _much, much_ easier:
...@@ -21,6 +21,7 @@ We're glad to get pull request if any functionality is missing or something is b ...@@ -21,6 +21,7 @@ We're glad to get pull request if any functionality is missing or something is b
* Explain the issue that your PR is solving - or link to an existing issue * Explain the issue that your PR is solving - or link to an existing issue
* Make sure that all existing tests pass * Make sure that all existing tests pass
* Make sure you followed [coding guidelines](https://github.com/sequelize/sequelize/blob/master/CONTRIBUTING.md#coding-guidelines)
* Add some tests for your new functionality or a test exhibiting the bug you are solving. Ideally all new tests should not pass _without_ your changes. * Add some tests for your new functionality or a test exhibiting the bug you are solving. Ideally all new tests should not pass _without_ your changes.
- Use [promise style](http://bluebirdjs.com/docs/why-promises.html) in all new tests. Specifically this means: - Use [promise style](http://bluebirdjs.com/docs/why-promises.html) in all new tests. Specifically this means:
- don't use `EventEmitter`, `QueryChainer` or the `success`, `done` and `error` events - don't use `EventEmitter`, `QueryChainer` or the `success`, `done` and `error` events
...@@ -28,7 +29,7 @@ We're glad to get pull request if any functionality is missing or something is b ...@@ -28,7 +29,7 @@ We're glad to get pull request if any functionality is missing or something is b
- don't use a done callback in your test, just return the promise chain. - don't use a done callback in your test, just return the promise chain.
- Small bugfixes and direct backports to the 1.7 branch are accepted without tests. - Small bugfixes and direct backports to the 1.7 branch are accepted without tests.
* If you are adding to / changing the public API, remember to add API docs, in the form of [JSDoc style](http://usejsdoc.org/about-getting-started.html) comments. See [section 4a](#4a-check-the-documentation ) for the specifics. * If you are adding to / changing the public API, remember to add API docs, in the form of [JSDoc style](http://usejsdoc.org/about-getting-started.html) comments. See [section 4a](#4a-check-the-documentation ) for the specifics.
* Add an entry to [the changelog](https://github.com/sequelize/sequelize/blob/master/changelog.md), with a link to the issue you are solving * Add an entry to the [changelog](https://github.com/sequelize/sequelize/blob/master/changelog.md), with a link to the issue you are solving
Still interested? Coolio! Here is how to get started: Still interested? Coolio! Here is how to get started:
...@@ -68,10 +69,9 @@ get SQLite tests for free :) ...@@ -68,10 +69,9 @@ get SQLite tests for free :)
#### 3a. Docker #### 3a. Docker
Makes sure Docker and docker-compose are installed. Makes sure `docker` and `docker-compose` are installed.
If running on OSX, install [Docker Toolbox](https://docs.docker.com/engine/installation/mac/) and If running on Mac OSX, install [Docker for Mac](https://docs.docker.com/docker-for-mac/).
launch `Docker Quickstart Terminal.app`.
Then simply run: Then simply run:
...@@ -89,42 +89,6 @@ To rebuild the image (in case of changed dependencies or similar). ...@@ -89,42 +89,6 @@ To rebuild the image (in case of changed dependencies or similar).
If sequelize is unable to connect to mysql you might want to try running `sudo docker-compose up` in a second terminal window. If sequelize is unable to connect to mysql you might want to try running `sudo docker-compose up` in a second terminal window.
#### 3b. [Deprecated] Docker and OSX using `boot2docker-cli`:
Docker does not run on OSX natively so you will have to use a VM layer like `boot2docker`.
[Docker Machine](https://docs.docker.com/machine/) will take care of the VM layer and it is included in Docker Toolbox.
[boot2docker-cli](https://github.com/boot2docker/boot2docker-cli) is a command line interface to manipulate `boot2docker`, it is officially deprecated in favor of Docker Machine. If you insists, you can see [boot2docker-cli/release](https://github.com/boot2docker/boot2docker-cli/releases) for install or you can also use [Homebrew](http://brew.sh) to install `boot2docker` after installing [VirtualBox](https://www.virtualbox.org).
After installing and intializing docker you can pull the docker container:
```console
$ boot2docker up
Waiting for VM and Docker daemon to start...
......
Started.
To connect the Docker client to the Docker daemon, please set:
export DOCKER_HOST=tcp://192.168.59.103:2375
$ export DOCKER_HOST=tcp://192.168.59.103:2375
$ docker pull mhansen/sequelize-contribution
```
And then setup and run the tests:
```console
$ CONTAINER=$(docker run -d -i -t mhansen/sequelize-contribution)
$ CONTAINER_IP=$(docker inspect --format='{{.NetworkSettings.IPAddress}}' $CONTAINER)
$ SEQ_HOST=$CONTAINER_IP SEQ_USER=sequelize_test make all
```
These are the same commands as above, although `sudo` is not required.
When you are done with your testing:
```console
$ boot2docker down
```
### 4. Run the tests ### ### 4. Run the tests ###
All tests are located in the `test` folder (which contains the All tests are located in the `test` folder (which contains the
...@@ -138,7 +102,7 @@ $ DIALECT=dialect SEQ_DB=database SEQ_USER=user SEQ_PW=password npm test ...@@ -138,7 +102,7 @@ $ DIALECT=dialect SEQ_DB=database SEQ_USER=user SEQ_PW=password npm test
``` ```
#### 4a. Check the documentation #### 4a. Check the documentation
This step only applies if you have actually changed something in the documentation. Please read `CONTRIBUTING.DOCS.md` first. This step only applies if you have actually changed something in the documentation. Please read [Documentation Contribution Guidelines](https://github.com/sequelize/sequelize/blob/master/CONTRIBUTING.DOCS.md) first.
To generate documentation for the `sequelize.js` file, run (in the sequelize dir) To generate documentation for the `sequelize.js` file, run (in the sequelize dir)
```console ```console
...@@ -151,10 +115,10 @@ The generated documentation will be placed in `docs/tmp.md`. ...@@ -151,10 +115,10 @@ The generated documentation will be placed in `docs/tmp.md`.
Just commit and send your pull request. Happy hacking and thank you for contributing. Just commit and send your pull request. Happy hacking and thank you for contributing.
### 6. Some words about coding style ### ### Coding Guidelines ###
Have a look at our [.jshintrc](https://github.com/sequelize/sequelize/blob/master/.jshintrc) file for the specifics. As part of the test process, all files will be linted, and your PR will _not_ be accepted if it does not pass linting. Have a look at our [.jshintrc](https://github.com/sequelize/sequelize/blob/master/.jshintrc) file for the specifics. As part of the test process, all files will be linted, and your PR will **not** be accepted if it does not pass linting.
#### 6.1. Spaces #### #### Spaces ####
Use spaces when defining functions. Use spaces when defining functions.
...@@ -174,7 +138,7 @@ if (condition) { ...@@ -174,7 +138,7 @@ if (condition) {
} }
``` ```
#### 6.2. Variable declarations #### #### Variable declarations ####
```js ```js
var num = 1 var num = 1
...@@ -182,14 +146,14 @@ var num = 1 ...@@ -182,14 +146,14 @@ var num = 1
, date = new Date(); , date = new Date();
``` ```
#### 6.3. Semicolons #### #### Semicolons ####
Yes Yes
# Publishing a release # Publishing a release
1. Ensure that latest build on master is green 1. Ensure that latest build on master is green
2. Ensure your local code is up to date (`git pull origin master`) 2. Ensure your local code is up to date (`git pull origin master`)
3. `npm version patch|minor|major` (see SemVer) 3. `npm version patch|minor|major` (see [Semantic Versioning](http://semver.org))
4. Update changelog to match version number, commit changelog 4. Update changelog to match version number, commit changelog
5. `git push --tags origin master` 5. `git push --tags origin master`
6. `npm publish .` 6. `npm publish .`
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!