async checkForUpdates() {
    this.logger?.info('Checking for updates');
    this.emit('checking-for-update');

    try {
      this.releases = await UpdaterGeneric.getReleases();
      const appCurrentVersion = `v${app.getVersion()}`;

      if (this.releases) {
        if (this.releases[0] === 'Error') {
          throw Error(this.releases[1]);
        }

        const latestReleaseVersion = this.releases[0].tag_name;
        const releaseNotes = markdownToHtml(this.releases[0].body.trim());

        if (latestReleaseVersion !== appCurrentVersion) {
          this.logger?.info(`Update available: ${this.releases[0].tag_name}`);

          this.emit('update-available', {
            version: latestReleaseVersion.replace(/^v/, ''),
            releaseNotes,
          });
        }
        else {
          this.logger?.info(`No updates available for v${app.getVersion()}`);

          this.emit('update-not-available', {
            version: latestReleaseVersion.replace(/^v/, ''),
            releaseNotes,
          });
        }
      }
      else {
        this.logger?.info(`No updates available for v${app.getVersion()}`);
        this.emit('update-not-available');
      }
    }
    catch (e) {
      const httpStatusCode = (e.message.match(/^\d+$/)) ? parseInt(e.message) : null;
      let message = (httpStatusCode === 429) ? 'ERR_RATE_LIMIT_EXCEEDED' : `ERR_HTTP_${httpStatusCode}`;

      if (httpStatusCode === 429) {
        message = 'ERR_RATE_LIMIT_EXCEEDED';
      }
      else if (typeof httpStatusCode === 'number') {
        message = `ERR_HTTP_${httpStatusCode}`;
      }
      else {
        message = e.message;
      }

      this.logger?.error(Error(message));
      this.emit('error', Error(message).toString());
    }
  }
Check for updates in GitHub releases