diff options
| author | Matias Niemelä | 2013-12-06 12:54:20 -0500 |
|---|---|---|
| committer | Matias Niemelä | 2013-12-09 11:52:28 -0500 |
| commit | a14266e46466d02871bc3edc2a9229dcfa5acc89 (patch) | |
| tree | 4facd17816104d22ef097804dda8fced18975af8 | |
| parent | b4d44e12987131bfd23399947fe9b2f860cc5729 (diff) | |
| download | angular.js-a14266e46466d02871bc3edc2a9229dcfa5acc89.tar.bz2 | |
chore(CHANGELOG): introduce perf() section for performance-related commits
Instead of using fix() or chore() when labelling a commit which improves
speed or performance use perf(). Perf commits will be listed in the
CHANGELOG under "Performance Improvements".
For example:
perf($animate): cache all getComputedStyle operations to reduce additional reflows
| -rw-r--r-- | CONTRIBUTING.md | 1 | ||||
| -rwxr-xr-x | changelog.js | 4 | ||||
| -rwxr-xr-x | validate-commit-msg.js | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5695ac51..e7ef319a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -198,6 +198,7 @@ Must be one of the following: * **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) * **refactor**: A code change that neither fixes a bug or adds a feature +* **perf**: A code change that improves performance * **test**: Adding missing tests * **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation diff --git a/changelog.js b/changelog.js index b9a623f3..fd30a185 100755 --- a/changelog.js +++ b/changelog.js @@ -142,6 +142,7 @@ var writeChangelog = function(stream, commits, version) { var sections = { fix: {}, feat: {}, + perf: {}, breaks: {} }; @@ -169,6 +170,7 @@ var writeChangelog = function(stream, commits, version) { stream.write(util.format(HEADER_TPL, version, version, currentDate())); printSection(stream, 'Bug Fixes', sections.fix); printSection(stream, 'Features', sections.feat); + printSection(stream, 'Performance Improvements', sections.perf); printSection(stream, 'Breaking Changes', sections.breaks, false); } @@ -186,7 +188,7 @@ var getPreviousTag = function() { var generate = function(version, file) { getPreviousTag().then(function(tag) { console.log('Reading git log since', tag); - readGitLog('^fix|^feat|BREAKING', tag).then(function(commits) { + readGitLog('^fix|^feat|^perf|BREAKING', tag).then(function(commits) { console.log('Parsed', commits.length, 'commits'); console.log('Generating changelog to', file || 'stdout', '(', version, ')'); writeChangelog(file ? fs.createWriteStream(file) : process.stdout, commits, version); diff --git a/validate-commit-msg.js b/validate-commit-msg.js index da069998..c68ebb74 100755 --- a/validate-commit-msg.js +++ b/validate-commit-msg.js @@ -21,6 +21,7 @@ var TYPES = { docs: true, style: true, refactor: true, + perf: true, test: true, chore: true, revert: true |
