shelljs-changelog
Advanced tools
Comparing version 0.2.2 to 0.2.3
19
index.js
@@ -8,2 +8,7 @@ #!/usr/bin/env node | ||
function parseGitUri(uri) { | ||
return uri.match(/https:..github.com\/([^./]+)\/([^./]+).*/) || | ||
uri.match(/git@github.com:(.*)\/(.*)\.git/); | ||
} | ||
function run() { | ||
@@ -13,5 +18,13 @@ echo('...generating changelog (be patient)'); | ||
config.silent = true; | ||
var repoInfo = exec('git remote show -n origin') | ||
.grep('Push') | ||
.match(/https:..github.com\/([^./]+)\/([^./]+).*/); | ||
var urls = exec('git remote show -n origin') | ||
.grep('Push'); | ||
if (!urls) { | ||
console.error('Unable to find any URLs you can push to'); | ||
process.exit(1); | ||
} | ||
var repoInfo = parseGitUri(urls); | ||
if (!repoInfo) { | ||
console.error('Unable to parse your git URL'); | ||
process.exit(2); | ||
} | ||
exec('curl -X POST -s "github-changelog-api.herokuapp.com/'+repoInfo[1]+'/'+repoInfo[2]+'"').to('CHANGELOG.md'); | ||
@@ -18,0 +31,0 @@ |
{ | ||
"name": "shelljs-changelog", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "A simple script to create & update a changelog", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
4204
6
40