Skip to content

Commit

Permalink
feat: updater can't work with electron-v tags
Browse files Browse the repository at this point in the history
  • Loading branch information
hrenaud committed Aug 16, 2024
1 parent 4c5c386 commit ad2eab5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
14 changes: 7 additions & 7 deletions electron-app/ecoindex-app/src/main/Updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,15 @@ const updaterLog = log.scope('main/Updater')

let IS_PROD = process.env.NODE_ENV === 'production'

let version = app.getVersion()
/**
* IS NOT WORKING BECAUSE OF THE CHOICE TO HAVE `electron-vX.Y.x` AS TAGNAME THAS IS NOT SEMVER COMPLIANT..
*/
let version = `electron-v${app.getVersion()}`

// eslint-disable-next-line no-constant-condition
if (false) {
if (true) {
IS_PROD = true
version = '1.3.8'
version = 'electron-v1.3.8'
}

/**
Expand Down Expand Up @@ -66,10 +69,7 @@ class Updater {
// https://github.com/cnumr/lighthouse-plugin-ecoindex/releases.atom
updaterLog.debug(`IS_PROD`, IS_PROD)
if (IS_PROD) {
let _arch = ''
if (os.platform() === 'darwin') {
_arch = 'x64'
} else _arch = os.arch()
const _arch = os.arch()
const feedUrl = `https://update.electronjs.org/cnumr/lighthouse-plugin-ecoindex/${process.platform}-${_arch}/${version}`
// const feedUrl = `https://update.electronjs.org/cnumr/lighthouse-plugin-ecoindex/${process.platform}-${os.arch()}/${app.getVersion()}`
const userAgent = format(
Expand Down
8 changes: 5 additions & 3 deletions electron-app/ecoindex-app/src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,12 @@ app.on('ready', () => {
credits: packageJson.description,
copyright: packageJson.publisher,
})
// #region Updates
// Updater.getInstance().checkForUpdates(false)
updateElectronApp({
logger: log.scope('update-electron-app'),
})
// updateElectronApp({
// logger: log.scope('update-electron-app'),
// })
// #endregion
// showNotification()
createMainWindow()
})
Expand Down

0 comments on commit ad2eab5

Please sign in to comment.