semantic-release
Advanced tools
Comparing version 1.1.0 to 1.1.1
{ | ||
"name": "semantic-release", | ||
"description": "semantic semver compliant package publishing", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"author": "Stephan Bönnemann <stephan@boennemann.me>", | ||
@@ -6,0 +6,0 @@ "bin": "./bin/semantic-release", |
@@ -20,3 +20,3 @@ # semantic-release | ||
"scripts": { | ||
"prepublish": "semantic-release pre" | ||
"prepublish": "semantic-release pre", | ||
"postpublish": "semantic-release post" | ||
@@ -23,0 +23,0 @@ } |
@@ -5,3 +5,3 @@ 'use strict' | ||
module.exports = function () { | ||
var exports = module.exports = function (cb) { | ||
// npm loads package.json data before running the `prepublish` hook | ||
@@ -14,5 +14,19 @@ // changing the version on `prepublish` has no effect | ||
var child = spawn('npm', ['publish', '--semantic-release-rerun']) | ||
var handler = exports.handleCloseAndExit.bind(null, cb) | ||
child.stdout.pipe(process.stdout) | ||
child.stderr.pipe(process.stderr) | ||
child.on('close', handler) | ||
child.on('exit', handler) | ||
child.on('error', cb) | ||
} | ||
exports.handleCloseAndExit = function (cb, code, signal) { | ||
if (code === 0) return cb(null) | ||
cb({ | ||
code: code, | ||
signal: signal, | ||
message: 'npm publish failed' | ||
}) | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8891
131