diff --git a/.github/workflows/compose-full-changelog.yaml b/.github/workflows/compose-full-changelog.yaml index 484074e44..b32d463ac 100644 --- a/.github/workflows/compose-full-changelog.yaml +++ b/.github/workflows/compose-full-changelog.yaml @@ -32,6 +32,7 @@ jobs: - name: Create full changelog id: full-changelog run: | + yarn add @octokit/rest mkdir "${{ github.workspace }}/${{ env.CHANGELOG_ARTIFACTS }}" # Get the changelog file name to build diff --git a/arduino-ide-extension/src/electron-main/ide-updater/ide-updater-impl.ts b/arduino-ide-extension/src/electron-main/ide-updater/ide-updater-impl.ts index a87536a48..67c65f525 100644 --- a/arduino-ide-extension/src/electron-main/ide-updater/ide-updater-impl.ts +++ b/arduino-ide-extension/src/electron-main/ide-updater/ide-updater-impl.ts @@ -81,11 +81,9 @@ export class IDEUpdaterImpl implements IDEUpdater { ? await fetch(`${CHANGELOG_BASE_URL}/${latestChangelogFileName}`) : null; const changelog = response?.ok ? await response?.text() : null; - + const currentVersionHeader = `\n\n---\n\n## ${this.updater.currentVersion}\n\n`; // We only want to see the release notes of newer versions - const currentVersionIndex = changelog?.indexOf( - `\r\n\r\n---\r\n\r\n## ${this.updater.currentVersion}\r\n\r\n` - ); + const currentVersionIndex = changelog?.indexOf(currentVersionHeader); const newChangelog = currentVersionIndex && currentVersionIndex > 0 ? changelog?.slice(0, currentVersionIndex)