File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
arduino-ide-extension/src/electron-main/ide-updater Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,10 @@ export class IDEUpdaterImpl implements IDEUpdater {
64
64
} = await this . updater . checkForUpdates ( ) ;
65
65
66
66
this . cancellationToken = cancellationToken ;
67
- if ( this . updater . currentVersion . compare ( updateInfo . version ) === - 1 ) {
67
+ if (
68
+ this . updater . currentVersion . compare ( updateInfo . version ) === - 1 ||
69
+ true
70
+ ) {
68
71
/*
69
72
'latest.txt' points to the latest changelog that has been generated by the CI,
70
73
so we need to make a first GET request to get the filename of the changelog
@@ -81,11 +84,9 @@ export class IDEUpdaterImpl implements IDEUpdater {
81
84
? await fetch ( `${ CHANGELOG_BASE_URL } /${ latestChangelogFileName } ` )
82
85
: null ;
83
86
const changelog = response ?. ok ? await response ?. text ( ) : null ;
84
-
87
+ const currentVersionHeader = `\n\n---\n\n## ${ this . updater . currentVersion } \n\n` ;
85
88
// 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
- ) ;
89
+ const currentVersionIndex = changelog ?. indexOf ( currentVersionHeader ) ;
89
90
const newChangelog =
90
91
currentVersionIndex && currentVersionIndex > 0
91
92
? changelog ?. slice ( 0 , currentVersionIndex )
You can’t perform that action at this time.
0 commit comments