File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -551,23 +551,24 @@ export default class Publish {
551551 "linkify" : false ,
552552 } ) ;
553553
554- var fullChangelog = `
554+ var fullChangelog =
555+ `
555556# Changelog
556557
557558### ${ this . #currentRelease. versionString } (${ this . #currentRelease. changelogDate } )
558559
559560${ this . #changelog. linkifyMarkdown ( changelogMarkdown ) }
560- ` . trim ( ) ;
561-
562- // patch CHANGELOG.md
563- if ( await pathExists ( this . #pkg . root + "/CHANGELOG.md" ) ) {
564- fullChangelog +=
565- "\n" +
566- fs
567- . readFileSync ( this . #pkg. root + "/CHANGELOG.md" , "utf8" )
568- . replace ( / # C h a n g e l o g \n / , "" )
569- . trim ( ) +
570- "\n" ;
561+ ` . trim ( ) + "\n" ;
562+
563+ // append CHANGELOG.md
564+ if ( ! this . #currentRelease . isMajor ) {
565+ if ( await pathExists ( this . #pkg . root + "/CHANGELOG.md" ) ) {
566+ fullChangelog +=
567+ fs
568+ . readFileSync ( this . #pkg. root + "/CHANGELOG.md" , "utf8" )
569+ . replace ( / # C h a n g e l o g \n / , "" )
570+ . trim ( ) + "\n" ;
571+ }
571572 }
572573
573574 // write CHANGELOG.md
You can’t perform that action at this time.
0 commit comments