From 4ba74c7ec8540752b60fdd472a5a73552c6be3d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6nnemann?= Date: Fri, 24 Apr 2015 00:52:34 +0200 Subject: [PATCH] Updated commit analysis (markdown) --- commit-analysis.md | 53 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/commit-analysis.md b/commit-analysis.md index 456ded7..0c928f3 100644 --- a/commit-analysis.md +++ b/commit-analysis.md @@ -1 +1,52 @@ -soon.jpg +## default analyzer + +The default analyzer implements the [AngularJS Commit Message Convention](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit) style. + +``` +(): + + +``` + +Examples: + +``` +feat(ruler): add inches as well as centimeters +``` + +``` +fix(protractor): fix 90 degrees counting as 91 degrees +``` + +``` +fix(pen): use blue ink instead of red ink + +BREAKING CHANGE: Pen now uses blue ink instead of red. + +To migrate, change your code from the following: + +`pen.draw('blue')` + +To: + +`pen.draw('red')` +``` + +[Synopsis](https://github.com/ajoslin/conventional-changelog/blob/master/CONVENTIONS.md) + + +## custom analyzers + +If you want to use commit message conventions other than Angular's you can provide your own analyzer in the `package.json`. + +Add a `release` field and provide a path where `semantic-release` can require your analyzer: + +```json +"release": { + "analyzer": "./lib/custom-analyzer" +} +``` + +The module should export a function that takes an array of commit objects (`{hash: '123456', message: 'changed stuff'`) and returns the the release type (`'major'`, `'premajor'`, `'minor'`, `'preminor'`, `'patch'`, `'prepatch'`, or `'prerelease'`), or `null` to not release a new version. + +Have a look at [the default analyzer](https://github.com/boennemann/semantic-release/blob/plugin-wip/lib/analyzer.js) for a sample implementation. \ No newline at end of file