Skip to content

Commit

Permalink
chore(changelog): ensure that CHANGELOG script generates valid diff urls
Browse files Browse the repository at this point in the history
  • Loading branch information
jgravois committed Mar 11, 2019
1 parent e36ac49 commit bbb82c1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions support/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ function getCommitData(from, to) {
.replace(/"returns"/g, "returns")
.replace(/\\/g, "\\\\")
*/
const commits = JSON.parse("["+stdout.slice(0, -1).replace(/Revert "no bash script"/g, "Revert 'no bash script'")+"]");
const last = _.last(commits);
const commits = JSON.parse("["+stdout.slice(0, -1)/*.replace()*/ +"]").reverse();
const today = new Date();
resolve({
previousVersion: /v\d\.\d\.\d/.test(from)
Expand Down Expand Up @@ -363,7 +362,7 @@ getReleases()
})
.then(([pairs, changelog, newVersion]) => {
const links = pairs.map(([from, to]) => {
to = to === "HEAD" ? getPackageVersion() : to;
to = to === "HEAD" ? "v" + getPackageVersion() : to;
return {
ref: to.replace("v", ""),
title: to,
Expand Down

0 comments on commit bbb82c1

Please sign in to comment.