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

Commit 8f39f453 by Felix Becker Committed by GitHub

chore: set up semantic-release (#7777)

- Set up semantic-release to automatically release from CI
- Remove the changelog, which is maintained automatically in GitHub releases from now on
- Add husky git hooks for validating commit messages with validate-commit-msg
- Extend contribution guide
- Adapt GitHub PR template
- Add readme badge

Closes #6550
1 parent b9bc8b83
_Thanks for wanting to fix something on Sequelize - we already love you long time! Please delete this text and fill in the template below. If unsure about something, just do as best as you're able._
<!--
Thanks for wanting to fix something on Sequelize - we already love you long time!
Please fill in the template below.
If unsure about something, just do as best as you're able.
_If your PR only contains changes to documentation, you may skip the template below._
If your PR only contains changes to documentation, you may skip the template below.
-->
### Pull Request check-list
_Please make sure to review and check all of these items:_
- [ ] Does `npm run test` or `npm run test-DIALECT` pass with this change (including linting)?
- [ ] Does your issue contain a link to existing issue (Closes #[issue]) or a description of the issue you are solving?
- [ ] Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
- [ ] Have you added new tests to prevent regressions?
- [ ] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
- [ ] Have you added an entry under `Future` in the changelog?
- [ ] Did you follow the commit message conventions explained in CONTRIBUTING.md?
_NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open._
<!-- NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open. -->
### Description of change
_Please provide a description of the change here._
<!-- Please provide a description of the change here. -->
......@@ -42,6 +42,13 @@ script:
- npm run lint
- "if [ $COVERAGE ]; then npm run cover && bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info; else npm run test; fi"
after_success:
- npm run semantic-release
branches:
except:
- /^v\d+\.\d+\.\d+$/
deploy:
provider: surge
project: ./esdoc/
......
......@@ -108,46 +108,25 @@ $ npm run docs
The generated documentation will be placed in `docs/tmp.md`.
### 5. That's all ###
### 5. Commit ###
Just commit and send your pull request. Happy hacking and thank you for contributing.
Sequelize follows the [AngularJS Commit Message Conventions](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#heading=h.em2hiij8p46d).
Example:
### Coding Guidelines ###
Have a look at our [.eslintrc](https://github.com/sequelize/sequelize/blob/master/.eslintrc) 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.
feat(pencil): add 'graphiteWidth' option
#### Spaces ####
Commit messages are used to automatically generate a changelog, so make sure to follow the convention.
If you are unsure, you can let [commitizen](https://github.com/commitizen/cz-cli) ask you questions and commit for you (just run `node_modules/.bin/git-cz`).
When you commit, your commit message will be validated automatically with [validate-commit-msg](https://github.com/kentcdodds/validate-commit-msg).
Use spaces when defining functions.
```js
function(arg1, arg2, arg3) {
return 1;
}
```
Use spaces for if statements.
```js
if (condition) {
// do something
} else {
// something else
}
```
Then push and send your pull request. Happy hacking and thank you for contributing.
#### Variable declarations ####
```js
var num = 1
, user = new User()
, date = new Date();
```
#### Semicolons ####
Yes
### Coding Guidelines ###
Have a look at our [.eslintrc](https://github.com/sequelize/sequelize/blob/master/.eslintrc) 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.
# Publishing a release
1. Ensure that latest build on master is green
2. Ensure your local code is up to date (`git pull origin master`)
3. `npm version patch|minor|major` (see [Semantic Versioning](http://semver.org))
......
......@@ -7,6 +7,7 @@
[![Slack Status](http://sequelize-slack.herokuapp.com/badge.svg)](http://sequelize-slack.herokuapp.com/)
[![npm](https://img.shields.io/npm/dm/sequelize.svg?maxAge=2592000)](https://www.npmjs.com/package/sequelize)
[![License](https://img.shields.io/npm/l/sequelize.svg?maxAge=2592000?style=plastic)](https://github.com/sequelize/sequelize/blob/master/LICENSE)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
Sequelize is a promise-based Node.js ORM for Postgres, MySQL, SQLite and Microsoft SQL Server. It features solid transaction support, relations, read replication and more.
......
This diff could not be displayed because it is too large.
{
"name": "sequelize",
"description": "Multi dialect ORM for Node.JS",
"version": "4.1.0",
"version": "0.0.0-development",
"author": "Sascha Depold <sascha@depold.com>",
"contributors": [
{
......@@ -61,11 +61,14 @@
"chai-datetime": "^1.4.1",
"chai-spies": "^0.7.1",
"cheerio": "^0.22.0",
"commitizen": "^2.9.6",
"continuation-local-storage": "^3.2.0",
"cross-env": "^3.0.0",
"cz-conventional-changelog": "^2.0.0",
"esdoc": "^0.5.2",
"eslint": "^3.6.0",
"hints": "^1.1.0",
"husky": "^0.13.4",
"istanbul": "^0.4.5",
"lcov-result-merger": "^1.2.0",
"mocha": "^3.0.2",
......@@ -75,11 +78,13 @@
"pg-native": "^1.10.0",
"pg-types": "^1.11.0",
"rimraf": "^2.5.4",
"semantic-release": "^6.3.6",
"sinon": "^1.17.6",
"sinon-chai": "^2.8.0",
"sqlite3": "^3.1.4",
"tedious": "^1.14.0",
"uuid-validate": "^0.0.2"
"uuid-validate": "^0.0.2",
"validate-commit-msg": "^2.12.2"
},
"keywords": [
"mysql",
......@@ -129,10 +134,17 @@
"sscce": "docker-compose run sequelize /bin/sh -c \"node sscce.js\"",
"sscce-mysql": "cross-env DIALECT=mysql npm run sscce",
"sscce-postgres": "cross-env DIALECT=postgres npm run sscce",
"sscce-sqlite": "cross-env DIALECT=sqlite npm run sscce"
"sscce-sqlite": "cross-env DIALECT=sqlite npm run sscce",
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
"commitmsg": "validate-commit-msg"
},
"engines": {
"node": ">=4.0.0"
},
"license": "MIT"
"license": "MIT",
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!