Skip to content

Commit

Permalink
chore: remove usage of changelog.json from releaser script (#591)
Browse files Browse the repository at this point in the history
  • Loading branch information
seemk authored Oct 31, 2022
1 parent dd490d2 commit 7ee2d51
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions scripts/release-message.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
const changelog = require('../CHANGELOG.json');
const { version } = require('../package.json');
const { dependencies } = require('../package-lock.json');

exports.getReleaseMessage = () => {
const release = changelog.entries.find(entry => entry.version == version);
if (!release) {
throw new Error('Current version not found in CHANGELOG.json');
}

const commentTypes = Object.keys(release.comments);
const changes = commentTypes.flatMap(type => {
return release.comments[type].map(change => `* (${type}) ${change.comment} by ${change.author}`);
});

const otelApiVersion = dependencies['@opentelemetry/api'].version;
const otelCoreVersion = dependencies['@opentelemetry/core'].version;
const otelInstrumentationVersion = dependencies['@opentelemetry/instrumentation-http'].version;
Expand All @@ -24,6 +13,5 @@ exports.getReleaseMessage = () => {
'',
'## Changes',
'',
changes.join('\n'),
].join('\n');
};

0 comments on commit 7ee2d51

Please sign in to comment.