Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2be6e5d34a | ||
|
|
a5cb9ea7f7 | ||
|
|
15e6daf7cc | ||
|
|
2326cda3f0 | ||
|
|
4afb280bee | ||
|
|
7da7695ba1 | ||
|
|
41125ee8aa | ||
|
|
cca50ef154 | ||
|
|
4807dee1e2 | ||
|
|
f89792e25b | ||
|
|
4078638ce9 | ||
|
|
89ded2d79c | ||
|
|
0a89265ae7 | ||
|
|
ad2a61586e | ||
|
|
45e04be49a | ||
|
|
d9b95940db | ||
|
|
2e18266023 | ||
|
|
9aef361da9 | ||
|
|
d57cb70c56 | ||
|
|
4b64afefe4 | ||
|
|
bca89a5274 | ||
|
|
f579d76596 | ||
|
|
07eb9f845c | ||
|
|
08b97e9a5f | ||
|
|
4b22426873 | ||
|
|
c7686752ab | ||
|
|
342064f198 | ||
|
|
5b387657a7 | ||
|
|
3141a7616b | ||
|
|
eec7c94b21 | ||
|
|
24f131adb4 | ||
|
|
95d9142d27 | ||
|
|
79b737e868 |
@@ -77,11 +77,11 @@ This removes the immediate connection between human emotions and version numbers
|
||||
|
||||
## How does it work?
|
||||
|
||||
Instead of writing [meaningless commit messages](http://whatthecommit.com/), we can take our time to think about the changes in the codebase and write them down. Following formalized conventions it this then possible to generate a helpful changelog and to derive the next semantic version number from them.
|
||||
Instead of writing [meaningless commit messages](http://whatthecommit.com/), we can take our time to think about the changes in the codebase and write them down. Following formalized conventions it is then possible to generate a helpful changelog and to derive the next semantic version number from them.
|
||||
|
||||
When `semantic-release` got setup it will do that after every successful continuous integration build of your master branch (or any other branch you specify) and publish the new version for you. That way no human is directly involved in the release process and your releases are guaranteed to be [unromantic and unsentimental](http://sentimentalversioning.org/).
|
||||
When `semantic-release` is setup it will do that after every successful continuous integration build of your master branch (or any other branch you specify) and publish the new version for you. This way no human is directly involved in the release process and your releases are guaranteed to be [unromantic and unsentimental](http://sentimentalversioning.org/).
|
||||
|
||||
If you fear the loss of control over timing and marketing implications of software releases you should know that `semantic-release` supports [release channels](https://github.com/npm/npm/issues/2718) using `npm`’s [dist-tags](https://docs.npmjs.com/cli/dist-tag). This way you can keep control over what your users end up using by default, you can decide when to promote an automatically released version to the stable channel and you can choose which versions to write blogposts and tweets about. You can use the same mechanism to [support older versions of your software](https://gist.github.com/boennemann/54042374e49c7ade8910), for example with important security fixes.
|
||||
If you fear the loss of control over timing and marketing implications of software releases you should know that `semantic-release` supports [release channels](https://github.com/npm/npm/issues/2718) using `npm`’s [dist-tags](https://docs.npmjs.com/cli/dist-tag). This way you can keep control over what your users end up using by default, you can decide when to promote an automatically released version to the stable channel, and you can choose which versions to write blogposts and tweets about. You can use the same mechanism to [support older versions of your software](https://gist.github.com/boennemann/54042374e49c7ade8910), for example with important security fixes.
|
||||
|
||||
This is what happens in series:
|
||||
|
||||
@@ -96,7 +96,7 @@ _Note:_ The current release/tag implementation is tied to GitHub, but could be o
|
||||
This module ships with the [AngularJS Commit Message Conventions](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit) and changelog generator, but you can [define your own](#plugins) style.
|
||||
|
||||
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
|
||||
format that includes a **type**, a **scope** and a **subject** ([full explanation](https://github.com/ajoslin/conventional-changelog/blob/master/conventions/angular.md)):
|
||||
format that includes a **type**, a **scope** and a **subject** ([full explanation](https://github.com/stevemao/conventional-changelog-angular/blob/master/convention.md)):
|
||||
|
||||
```
|
||||
<type>(<scope>): <subject>
|
||||
|
||||
@@ -13,6 +13,7 @@ var normalizeData = require('normalize-package-data')
|
||||
log.heading = 'semantic-release'
|
||||
var env = process.env
|
||||
var pkg = JSON.parse(fs.readFileSync('./package.json'))
|
||||
var originalPkg = _.cloneDeep(pkg)
|
||||
normalizeData(pkg)
|
||||
var knownOptions = {
|
||||
branch: String,
|
||||
@@ -51,6 +52,7 @@ npmconf.load({}, function (err, conf) {
|
||||
auth: {
|
||||
token: env.NPM_TOKEN
|
||||
},
|
||||
cafile: conf.get('cafile'),
|
||||
loglevel: conf.get('loglevel'),
|
||||
registry: require('../src/lib/get-registry')(pkg, conf),
|
||||
tag: (pkg.publishConfig || {}).tag || conf.get('tag') || 'latest'
|
||||
@@ -138,7 +140,7 @@ npmconf.load({}, function (err, conf) {
|
||||
log.silly('pre', 'Couldn\'t find npm-shrinkwrap.json.')
|
||||
}
|
||||
|
||||
fs.writeFileSync('./package.json', JSON.stringify(_.assign(pkg, {
|
||||
fs.writeFileSync('./package.json', JSON.stringify(_.assign(originalPkg, {
|
||||
version: release.version
|
||||
}), null, 2))
|
||||
|
||||
@@ -158,6 +160,6 @@ npmconf.load({}, function (err, conf) {
|
||||
log.verbose('post', (published ? 'Published' : 'Generated') + ' release notes.', release)
|
||||
})
|
||||
} else {
|
||||
log.error('post', 'Command "' + options.argv.remain[0] + '" not recognized. User either "pre" or "post"')
|
||||
log.error('post', 'Command "' + options.argv.remain[0] + '" not recognized. Use either "pre" or "post"')
|
||||
}
|
||||
})
|
||||
|
||||
+8
-8
@@ -15,7 +15,7 @@
|
||||
"dependencies": {
|
||||
"@bahmutov/parse-github-repo-url": "^0.1.0",
|
||||
"@semantic-release/commit-analyzer": "^2.0.0",
|
||||
"@semantic-release/condition-travis": "^5.0.0",
|
||||
"@semantic-release/condition-travis": "^5.0.2",
|
||||
"@semantic-release/error": "^1.0.0",
|
||||
"@semantic-release/last-release-npm": "^1.2.1",
|
||||
"@semantic-release/release-notes-generator": "^2.0.0",
|
||||
@@ -26,9 +26,9 @@
|
||||
"nopt": "^3.0.3",
|
||||
"normalize-package-data": "^2.3.4",
|
||||
"npmconf": "^2.1.2",
|
||||
"npmlog": "^2.0.0",
|
||||
"npmlog": "^4.0.0",
|
||||
"require-relative": "^0.8.7",
|
||||
"run-auto": "^1.1.2",
|
||||
"run-auto": "^2.0.0",
|
||||
"run-series": "^1.1.3",
|
||||
"semver": "^5.0.3"
|
||||
},
|
||||
@@ -36,14 +36,14 @@
|
||||
"coveralls": "^2.11.4",
|
||||
"cz-conventional-changelog": "^1.1.4",
|
||||
"mkdirp": "^0.5.1",
|
||||
"nixt": "^0.4.1",
|
||||
"nock": "^5.2.1",
|
||||
"nixt": "^0.5.0",
|
||||
"nock": "^8.0.0",
|
||||
"npm-registry-couchapp": "^2.6.11",
|
||||
"nyc": "^5.0.0",
|
||||
"nyc": "^7.0.0",
|
||||
"proxyquire": "^1.7.3",
|
||||
"rimraf": "^2.5.0",
|
||||
"standard": "^5.3.0",
|
||||
"tap": "^5.0.0"
|
||||
"standard": "^7.0.1",
|
||||
"tap": "^6.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10",
|
||||
|
||||
@@ -49,6 +49,9 @@ module.exports = function (config, cb) {
|
||||
function extract () {
|
||||
exec(
|
||||
'git log -E --format=%H==SPLIT==%B==END== ' + range,
|
||||
{
|
||||
maxBuffer: 1024 * 1024 // 1MB instead of 220KB (issue #286)
|
||||
},
|
||||
function (err, stdout) {
|
||||
if (err) return cb(err)
|
||||
|
||||
|
||||
+2
-2
@@ -10,13 +10,13 @@ module.exports = function (config, cb) {
|
||||
|
||||
auto({
|
||||
lastRelease: plugins.getLastRelease.bind(null, config),
|
||||
commits: ['lastRelease', function (cb, results) {
|
||||
commits: ['lastRelease', function (results, cb) {
|
||||
getCommits(_.assign({
|
||||
lastRelease: results.lastRelease
|
||||
}, config),
|
||||
cb)
|
||||
}],
|
||||
type: ['commits', 'lastRelease', function (cb, results) {
|
||||
type: ['commits', 'lastRelease', function (results, cb) {
|
||||
getType(_.assign({
|
||||
commits: results.commits,
|
||||
lastRelease: results.lastRelease
|
||||
|
||||
@@ -4,7 +4,10 @@ const rawCommits = [
|
||||
]
|
||||
|
||||
module.exports = {
|
||||
exec: function (command, cb) {
|
||||
exec: function (command, options, cb) {
|
||||
if (typeof cb === 'undefined' && typeof options === 'function') {
|
||||
cb = options
|
||||
}
|
||||
if (/contains/.test(command)) {
|
||||
if (/notinhistory/.test(command)) return cb(new Error())
|
||||
return cb(null, 'whatever\nmaster\n')
|
||||
|
||||
Reference in New Issue
Block a user