eslint / eslint-release

The ESLint release tool
Other
24 stars 11 forks source link

Error during release calculation #5

Closed nzakas closed 8 years ago

nzakas commented 8 years ago

The unit tests seem to work okay, but when I try to do a release using eslint-release (master branch), I get the following error:

Running tests
Hi
Hi
Calculating changes for release
C:\Users\Nicholas\projects\personal\eslint-release\lib\release-ops.js:174
            parsed[parsed.length - 1].body += log + "\n";
                                     ^
TypeError: Cannot read property 'body' of undefined
    at C:\Users\Nicholas\projects\personal\eslint-release\lib\release-ops.js:174:38
    at Array.forEach (native)
    at parseLogs (C:\Users\Nicholas\projects\personal\eslint-release\lib\release-ops.js:160:10)
    at calculateReleaseFromGitLogs (C:\Users\Nicholas\projects\personal\eslint-release\lib\release-ops.js:227:27)
    at calculateReleaseInfo (C:\Users\Nicholas\projects\personal\eslint-release\lib\release-ops.js:288:12)
    at Object.release (C:\Users\Nicholas\projects\personal\eslint-release\lib\release-ops.js:342:23)
    at Object.<anonymous> (C:\Users\Nicholas\projects\personal\eslint-release\bin\eslint-release.js:27:12)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)

I'm not entirely sure the purpose of the code that's throwing the error. I think it's related to this change I made to fix another bug: https://github.com/eslint/eslint-release/commit/2578f31149048b413f6ea1d049eb046cb9c83b4a

Basically, you can't have a line break right in the middle of a shell command, that was causing another error.

@btmills any insights?

btmills commented 8 years ago

What was the most recent commit when that failed? I'm able to reproduce this in a test when the regex doesn't match on the most recent commit.

btmills commented 8 years ago

Specifically, what is the output of git log --no-merges --pretty=format:"* %h %s (%an)%n%b" -n 5?

nzakas commented 8 years ago

Hmm, pretty sure I pushed what I had to master, you should be able to get that. I'm on a tablet at the moment, so I can't run it right now.

btmills commented 8 years ago

I found the fix, but in the process of confirming it, I forgot to turn off wifi, and it (as designed) committed the changes and pushed an alpha.5 to master. I'm thinking the best thing to do is create a PR that reverts the alpha.5 commits, then a second PR to fix the bug?