@@ -15,11 +15,12 @@ const mkdirSync = function (path) {
1515 throw e ;
1616 }
1717 }
18- }
18+ } ;
1919
2020// Find changelog for a specific version
2121const getChangelog = ( changelogFilePath , forVersion ) => {
22- const prefix = '# ' ;
22+ const prefix = '<a name="' ;
23+ const skipLines = 1 ;
2324 return new Promise ( ( resolve ) => {
2425 fs . readFile ( changelogFilePath , ( err , bytes ) => {
2526 if ( err ) {
@@ -31,8 +32,8 @@ const getChangelog = (changelogFilePath, forVersion) => {
3132 let bodyStartIndex = lines . findIndex ( ( str ) => str . substr ( 0 , prefix . length + forVersion . length ) === `${ prefix } ${ forVersion } ` ) ;
3233 if ( bodyStartIndex > - 1 ) {
3334 let bodyEndIndex = lines . findIndex ( ( str , idx ) => idx > bodyStartIndex && str . substr ( 0 , prefix . length ) === prefix ) ;
34- let header = lines [ bodyStartIndex ] . substring ( prefix . length ) ;
35- let body = lines . slice ( bodyStartIndex + 1 , bodyEndIndex ) . join ( '\n' ) ;
35+ let header = forVersion ;
36+ let body = lines . slice ( bodyStartIndex + 1 + skipLines , bodyEndIndex ) . join ( '\n' ) ;
3637 resolve ( { header, body} ) ;
3738 } else {
3839 resolve ( { header : forVersion , body : '' } ) ;
@@ -153,7 +154,7 @@ resetTempResources()
153154 . then ( ( [ changelog , assets ] ) => {
154155 return publish ( {
155156 ghApiToken : process . env . GH_TOKEN ,
156- projectOwner : 'angular-translate ' ,
157+ projectOwner : 'knalli ' ,
157158 projectRepo : process . env . PROJECT_REPO || pkg . name ,
158159 projectVersion : pkg . version ,
159160 projectVersionName : `${ pkg . name } ${ changelog . header || pkg . version } ` ,
0 commit comments