We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40d27f8 commit d18af90Copy full SHA for d18af90
lib/lifecycles/changelog.js
@@ -23,7 +23,7 @@ function outputChangelog (args, newVersion) {
23
createIfMissing(args)
24
const header = args.header
25
26
- let oldContent = args.dryRun ? '' : fs.readFileSync(args.infile, 'utf-8')
+ let oldContent = args.dryRun || args.releaseCount === 0 ? '' : fs.readFileSync(args.infile, 'utf-8')
27
const oldContentStart = oldContent.search(START_OF_LAST_RELEASE_PATTERN)
28
// find the position of the last release and remove header:
29
if (oldContentStart !== -1) {
0 commit comments