Skip to content

Instantly share code, notes, and snippets.

@shinout
Created May 26, 2016 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shinout/fa0de13e722540b938a7161e95173410 to your computer and use it in GitHub Desktop.
Save shinout/fa0de13e722540b938a7161e95173410 to your computer and use it in GitHub Desktop.
nca-cli.js
#!/usr/bin/env node
var fs = require('fs')
var NOT_INSTALLED = [
'-------------------------------------------------------------------',
' node-circleci-autorelease is not installed locally.\n',
' npm install --save-dev node-circleci-autorelease\n',
' If already isntalled, make sure you are in the project root.',
'-------------------------------------------------------------------'].join('\n')
function run() {
var packagePath = process.cwd() + '/node_modules/node-circleci-autorelease'
if (!fs.existsSync(packagePath)) {
console.error(NOT_INSTALLED)
process.exit(1)
}
require(packagePath).run(process.argv.slice(2));
}
run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment