Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion electron-builder-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ module.exports = {
category: 'Network',
target: [
'dir',
'AppImage'
'AppImage',
'deb'
]
},
win: {
Expand Down
8 changes: 7 additions & 1 deletion src/auto-updater/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const { rootPath: appDir } = require('electron-root-path')
const fs = require('fs')
const path = require('path')
const {
DebUpdater,
AppImageUpdater,
NsisUpdater,
AppUpdater
Expand Down Expand Up @@ -299,7 +300,12 @@ const _autoUpdaterFactory = () => {
})
}
if (process.platform === 'linux') {
autoUpdater = new AppImageUpdater()
autoUpdater = (
process.env.APPIMAGE ||
process.env.IS_AUTO_UPDATE_BEING_TESTED
)
? new AppImageUpdater()
: new DebUpdater()

// An option to debug the auto-update flow non-packaged build
if (
Expand Down
1 change: 1 addition & 0 deletions src/error-manager/github-issue-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ${description}
| RAM | ${totalRamGb}GB (${freeRamGb}GB free) |
| App RAM limit | ${ramLimitMb}Mb (${usedRamMb}MB used) |
| Is BFX API Staging used | ${isBfxApiStagingUsed} |
| Is AppImage used | ${isAppImageUsed} |

<details>

Expand Down
11 changes: 10 additions & 1 deletion src/helpers/get-debug-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ module.exports = (eol = os.EOL) => {
const bfxApiStagingDetail = isBfxApiStagingUsed
? `${eol}Is BFX API Staging used: Yes`
: ''
const isAppImageUsed = !!process.env.APPIMAGE

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i might be missing something but it looks like IS_AUTO_UPDATE_BEING_TESTED needs to be checked as well
in any case, i would suggest going with a list of possible values for an environment variable and check against those instead of using APPIMAGE and IS_AUTO_UPDATE_BEING_TESTED as flags. If we want to go with flags, i'd suggest checking values cause 'false' converts to true in current implementation

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cause 'false' converts to true in current implementation - I know
as I wrote above, we don't control APPIMAGE, electron provides it
about IS_AUTO_UPDATE_BEING_TESTED in other case I'd agree with you, but here it's not reasonable as we use it only for the dev mode
in prod mode we shouldn't have any values there
and in dev one any true value should lead to the turning of the corresponding logic
This is exactly how we wanted to use it and did it many years ago. I don't think we need to change it

const isAppImageUsedStr = isAppImageUsed
? 'Yes'
: 'No'
const linuxReleaseType = process.platform === 'linux'
? `${eol}Is AppImage used: ${isAppImageUsedStr}`
: ''

const detail = `\
Version: ${version}${eol}\
Expand All @@ -130,7 +137,8 @@ Node.js: ${nodeVersion}${eol}\
V8: ${v8Version}${eol}\
OS version: ${osVersion}${eol}\
OS release: ${osType} ${osArch} ${osRelease}\
${bfxApiStagingDetail}
${bfxApiStagingDetail}\
${linuxReleaseType}
`

return {
Expand All @@ -157,6 +165,7 @@ ${bfxApiStagingDetail}
cpuModel,
cpuCount,
isBfxApiStagingUsed,
isAppImageUsed,
detail
}
}