From d067f62fe7bfe167af81b0c4ae4570f36ef23b9a Mon Sep 17 00:00:00 2001 From: Brendan Kenny Date: Fri, 17 Nov 2017 18:07:58 -0800 Subject: [PATCH] docs(changelog): tweaks to changelog template and instructions --- CONTRIBUTING.md | 13 +++++++++---- build/changelog-generator/index.js | 8 ++++++-- build/changelog-generator/templates/template.hbs | 3 ++- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 26781ff93c36..4c5e5819db4c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -118,7 +118,7 @@ yarn build-all # * Test err'thing * echo "Test the CLI." -lighthouse --perf "chrome://version" +lighthouse --perf "https://example.com" yarn smoke echo "Test the extension" @@ -142,11 +142,16 @@ echo "Test the lighthouse-viewer build" # Drop in a results.json or paste an existing gist url (e.g. https://gist.github.com/ebidel/b9fd478b5f40bf5fab174439dc18f83a). # Check for errors! +# * Update changelog * +git fetch --tags +yarn changelog +# add new contributors, e.g. from +# git shortlog -s -e -n v2.3.0..HEAD + # * Put up the PR * echo "Branch and commit the version bump." -git co -b bumpv240 -git c "2.4.0" -yarn changelog +git checkout -b bumpv240 +git commit -am "2.4.0" git tag -a v2.4.0 -m "v2.4.0" echo "Generate a PR and get it merged." diff --git a/build/changelog-generator/index.js b/build/changelog-generator/index.js index 6ef54fd0f49b..ec8abb9e9398 100644 --- a/build/changelog-generator/index.js +++ b/build/changelog-generator/index.js @@ -31,6 +31,10 @@ const writerOpts = { if (commit.type === 'test') { commit.type = 'tests'; + } else if (commit.type === 'cli') { + commit.type = 'CLI'; + } else if (commit.type === 'new_audit') { + commit.type = 'New Audits'; } if (commit.type) { @@ -60,10 +64,10 @@ const writerOpts = { groupBy: 'type', commitGroupsSort: (a, b) => { // put new audit on the top - if (a.title === 'New audit') { + if (a.title === 'New Audits') { return -1; } - if (b.title === 'New audit') { + if (b.title === 'New Audits') { return 1; } diff --git a/build/changelog-generator/templates/template.hbs b/build/changelog-generator/templates/template.hbs index fb0ffc547ea1..2ddcb73385b3 100644 --- a/build/changelog-generator/templates/template.hbs +++ b/build/changelog-generator/templates/template.hbs @@ -10,7 +10,7 @@ {{#each commitGroups}} {{#if title~}} - ### {{title}} + ## {{title}} {{/if}} {{#each commits}} @@ -18,3 +18,4 @@ {{/each}} {{/each}} +