File tree 2 files changed +3
-4
lines changed
arduino-ide-extension/src/electron-main/ide-updater
2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 32
32
- name : Create full changelog
33
33
id : full-changelog
34
34
run : |
35
+ yarn add @octokit/rest
35
36
mkdir "${{ github.workspace }}/${{ env.CHANGELOG_ARTIFACTS }}"
36
37
37
38
# Get the changelog file name to build
Original file line number Diff line number Diff line change @@ -81,11 +81,9 @@ export class IDEUpdaterImpl implements IDEUpdater {
81
81
? await fetch ( `${ CHANGELOG_BASE_URL } /${ latestChangelogFileName } ` )
82
82
: null ;
83
83
const changelog = response ?. ok ? await response ?. text ( ) : null ;
84
-
84
+ const currentVersionHeader = `\n\n---\n\n## ${ this . updater . currentVersion } \n\n` ;
85
85
// We only want to see the release notes of newer versions
86
- const currentVersionIndex = changelog ?. indexOf (
87
- `\r\n\r\n---\r\n\r\n## ${ this . updater . currentVersion } \r\n\r\n`
88
- ) ;
86
+ const currentVersionIndex = changelog ?. indexOf ( currentVersionHeader ) ;
89
87
const newChangelog =
90
88
currentVersionIndex && currentVersionIndex > 0
91
89
? changelog ?. slice ( 0 , currentVersionIndex )
You can’t perform that action at this time.
0 commit comments