Skip to content

Commit

Permalink
fix: pathing in release-message script (#619)
Browse files Browse the repository at this point in the history
  • Loading branch information
seemk authored Nov 22, 2022
1 parent 3de4141 commit d500919
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/release-message.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
const { version } = require('../package.json');
const { dependencies } = require('../package-lock.json');
const { readFileSync } = require('fs');
const path = require('path');

exports.getReleaseMessage = () => {
const changelog = readFileSync('../CHANGELOG.md', { encoding: 'utf-8' });
const changelog = readFileSync(
path.resolve(__dirname, '../CHANGELOG.md'),
{ encoding: 'utf-8' }
);
const changeHeaderBegin = changelog.indexOf(`## ${version}`);

if (changeHeaderBegin === -1) {
Expand Down

0 comments on commit d500919

Please sign in to comment.