git-conventional-commits
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -12,3 +12,5 @@ { | ||
"ops", | ||
"docs" | ||
"docs", | ||
"merge", | ||
"revert" | ||
], | ||
@@ -15,0 +17,0 @@ "commitScopes": [], |
@@ -7,3 +7,3 @@ const Config = require("./config"); | ||
exports.command = 'changelog' | ||
exports.desc = 'Generate change log from conventional commits`' | ||
exports.desc = 'Generate change log from conventional commits' | ||
exports.builder = function (yargs) { | ||
@@ -17,4 +17,9 @@ yargs.option('config', { | ||
yargs.option('release', { | ||
alias: 'r', | ||
yargs.option('version', { | ||
alias: 'v', | ||
desc: 'Release version', | ||
requiresArg: true | ||
}) | ||
yargs.option('name', { | ||
alias: 'n', | ||
desc: 'Release name', | ||
@@ -30,5 +35,5 @@ requiresArg: true | ||
yargs.option('markdown', { | ||
alias: 'm', | ||
type: 'string', | ||
array: true, | ||
alias: 'm', | ||
desc: 'Add multiple custom markdown snippets e.g. "### Assets\\n* [awesome app](https://example.org/awesome.zip)"', | ||
@@ -46,5 +51,7 @@ requiresArg: true | ||
const conventionalCommits = await commitConvention.commitLog(); | ||
const conventionalVersion = await commitConvention.version(conventionalCommits); | ||
let releaseName = argv.release || conventionalVersion; | ||
let releaseName = argv.version || await commitConvention.version(conventionalCommits); | ||
if (argv.versionName) { | ||
releaseName += ` - ${argv.versionName}`; | ||
} | ||
@@ -85,13 +92,1 @@ const changelogCommits = conventionalCommits | ||
} | ||
@@ -40,2 +40,2 @@ const Config = require("./config"); | ||
} | ||
} | ||
} |
@@ -5,3 +5,3 @@ const Config = require("./config"); | ||
exports.command = 'init' | ||
exports.desc = 'Creates a config file template `git-conventional-commits.json`' | ||
exports.desc = 'Creates config file template `./git-conventional-commits.json`' | ||
exports.builder = function(yargs) { | ||
@@ -26,2 +26,2 @@ yargs.option('config', { | ||
} | ||
} | ||
} |
@@ -24,2 +24,2 @@ const Config = require("./config"); | ||
console.log(conventionalVersion); | ||
} | ||
} |
@@ -91,2 +91,2 @@ const fs = require("fs"); | ||
defaultConfig: defaultConfig, | ||
}; | ||
} |
{ | ||
"name": "git-conventional-commits", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "git conventional commits util", | ||
@@ -8,3 +8,3 @@ "licence": "MIT", | ||
"scripts": { | ||
"start": "cli.js", | ||
"start": "./cli.js", | ||
"test": "jest" | ||
@@ -11,0 +11,0 @@ }, |
@@ -5,3 +5,3 @@ # Git Conventional Changelog Generator | ||
**[Git Commit Convention](https://gist.github.com/qoomon/5dfcdf8eec66a051ecd85625518cfd13)** | ||
**ℹ Have a look at [Git Commit Conventions](https://gist.github.com/qoomon/5dfcdf8eec66a051ecd85625518cfd13)** | ||
@@ -37,3 +37,5 @@ ### Install | ||
"ops", | ||
"doc" | ||
"doc", | ||
"merge", | ||
"revert" | ||
], | ||
@@ -40,0 +42,0 @@ "commitScopes": [], |
28990
587
152