Created
May 26, 2016 14:24
-
-
Save shinout/fa0de13e722540b938a7161e95173410 to your computer and use it in GitHub Desktop.
nca-cli.js
This file contains hidden or 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
#!/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