Skip to content

Commit

Permalink
fix update-changelog script
Browse files Browse the repository at this point in the history
  • Loading branch information
jchip committed Jul 8, 2017
1 parent 119079f commit 061391e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"lerna": "2.0.0-rc.5",
"lerna": "2.0.0",
"version": "independent",
"command.publish.config": {
"ignore": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"devDependencies": {
"bluebird": "^3.5.0",
"lerna": "^2.0.0-rc.5",
"lerna": "^2.0.0",
"lodash": "^4.17.2",
"semver": "^5.3.0",
"xclap": "^0.2.0",
Expand Down
10 changes: 7 additions & 3 deletions tools/update-changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,16 @@ const checkGitClean = () => {
const processLernaUpdated = output => {
// search for last commit that's Publish using lerna
const lernaInfo = output.stderr.split("\n");
const tagSig = "Comparing with tag";
const tagSig = "Comparing with";
let tagIndex;
const tagLine = lernaInfo.find(x => {
let tagLine = lernaInfo.find(x => {
tagIndex = x.indexOf(tagSig);
return tagIndex >= 0;
});
}).trim();

if (tagLine.endsWith(".")) {
tagLine = tagLine.substr(0, tagLine.length - 1);
}

assert(tagLine, "Can't find last publish tag from lerna");
const tag = tagLine.substr(tagIndex + tagSig.length).trim();
Expand Down

0 comments on commit 061391e

Please sign in to comment.