-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(release): added semantic-release
- Loading branch information
1 parent
d6d2f28
commit d0902a0
Showing
4 changed files
with
5,441 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//registry.npmjs.org/:_authToken=${NPM_TOKEN} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
'use strict' | ||
|
||
var semver = require('semver') | ||
|
||
function conditionNodeVersion (pluginConfig, config, callback) { | ||
pluginConfig = pluginConfig || {} | ||
config = config || {} | ||
|
||
function isVerbose () { | ||
return pluginConfig.verbose || | ||
pluginConfig.debug || | ||
config.verbose || | ||
config.debug | ||
} | ||
|
||
if (isVerbose()) { | ||
console.log('condition plugin config', pluginConfig) | ||
console.log('condition config environment', config.env) | ||
console.log('condition config options', config.options) | ||
// console.log('node version', process.versions.node) | ||
} | ||
|
||
function fail (message) { | ||
return callback(new Error(message)) | ||
} | ||
|
||
// if (typeof pluginConfig.node !== 'string') { | ||
// return fail('Missing node version in the config') | ||
// } | ||
|
||
// if (!semver.satisfies(process.versions.node, pluginConfig.node)) { | ||
// return fail('Only allowed to publish from Node ' + | ||
// pluginConfig.node + ' not from ' + process.versions.node) | ||
// } | ||
|
||
console.log('ok to publish from this version of Node', pluginConfig.node) | ||
|
||
callback(null) | ||
} | ||
|
||
module.exports = conditionNodeVersion |
Oops, something went wrong.