Skip to content

Commit

Permalink
docs(changelog): tweaks to changelog template and instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
brendankenny committed Nov 18, 2017
1 parent 32ed80c commit d067f62
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
13 changes: 9 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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."

Expand Down
8 changes: 6 additions & 2 deletions build/changelog-generator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}

Expand Down
3 changes: 2 additions & 1 deletion build/changelog-generator/templates/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
{{#each commitGroups}}

{{#if title~}}
### {{title}}
## {{title}}

{{/if}}
{{#each commits}}
{{~> commit root=@root}}

{{/each}}
{{/each}}

0 comments on commit d067f62

Please sign in to comment.